Class ConservativeProxySelector
- java.lang.Object
-
- org.eclipse.aether.util.repository.ConservativeProxySelector
-
- All Implemented Interfaces:
ProxySelector
public final class ConservativeProxySelector extends java.lang.Object implements ProxySelector
A proxy selector that delegates to another selector but only if a repository has no proxy yet. If a proxy has already been assigned to a repository, that is selected.
-
-
Field Summary
Fields Modifier and Type Field Description private ProxySelectorselector
-
Constructor Summary
Constructors Constructor Description ConservativeProxySelector(ProxySelector selector)Creates a new selector that delegates to the specified selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProxygetProxy(RemoteRepository repository)Selects a proxy for the specified remote repository.
-
-
-
Field Detail
-
selector
private final ProxySelector selector
-
-
Constructor Detail
-
ConservativeProxySelector
public ConservativeProxySelector(ProxySelector selector)
Creates a new selector that delegates to the specified selector.- Parameters:
selector- The selector to delegate to in case a repository has no proxy yet, must not benull.
-
-
Method Detail
-
getProxy
public Proxy getProxy(RemoteRepository repository)
Description copied from interface:ProxySelectorSelects a proxy for the specified remote repository.- Specified by:
getProxyin interfaceProxySelector- Parameters:
repository- The repository for which to select a proxy, must not benull.- Returns:
- The selected proxy or
nullif none.
-
-