public class ProxySelectorProxySettingsManager extends ProxySelector
ProxySelector that uses
ProxySettingsManager to fetch the data. To install this proxy
selector globally, use the method setAsDefault(boolean).| Constructor and Description |
|---|
ProxySelectorProxySettingsManager(ProxySelector aFallback)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectFailed(URI aURI,
SocketAddress aAddr,
IOException ex) |
ProxySelector |
getFallbackProxySelector() |
protected com.helger.commons.state.EHandled |
handleConnectFailed(URI aURI,
SocketAddress aAddr,
IOException ex) |
static boolean |
isDefault() |
List<Proxy> |
select(URI aURI) |
protected List<Proxy> |
selectProxies(URI aURI) |
static void |
setAsDefault(boolean bUseOldAsFallback) |
getDefault, setDefaultpublic ProxySelectorProxySettingsManager(@Nullable ProxySelector aFallback)
aFallback - Fallback ProxySelector to be used, if no matches are found
in ProxySettingsManager. May be null.@Nullable public final ProxySelector getFallbackProxySelector()
@Nullable @OverrideOnDemand protected List<Proxy> selectProxies(@Nonnull URI aURI)
aURI - The URI that a connection is required to. Never null.null in which case no proxy will be used.@Nonnull public List<Proxy> select(@Nonnull URI aURI)
select in class ProxySelector@Nonnull @OverrideOnDemand protected com.helger.commons.state.EHandled handleConnectFailed(@Nonnull URI aURI, @Nonnull SocketAddress aAddr, @Nonnull IOException ex)
aURI - The URI that the proxy failed to serve. Never null.aAddr - The socket address of the proxy/SOCKS server. Never
null.ex - The I/O exception thrown when the connect failed. Never
null.EHandledpublic void connectFailed(@Nonnull URI aURI, @Nonnull SocketAddress aAddr, @Nonnull IOException ex)
connectFailed in class ProxySelectorpublic static boolean isDefault()
public static void setAsDefault(boolean bUseOldAsFallback)
Copyright © 2016–2019 Philip Helger. All rights reserved.