Class ProxyListFallbackSelector
- java.lang.Object
-
- java.net.ProxySelector
-
- com.github.markusbernhardt.proxy.selector.misc.ProxyListFallbackSelector
-
public class ProxyListFallbackSelector extends ProxySelector
Implements a fallback selector to warp it around an existing ProxySelector. This will remove proxies from a list of proxies and implement an automatic retry mechanism.- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
-
Constructor Summary
Constructors Constructor Description ProxyListFallbackSelector(long retryAfterMs, ProxySelector delegate)ConstructorProxyListFallbackSelector(ProxySelector delegate)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectFailed(URI uri, SocketAddress sa, IOException ioe)connectFailedList<Proxy>select(URI uri)selectStringtoString()-
Methods inherited from class java.net.ProxySelector
getDefault, of, setDefault
-
-
-
-
Constructor Detail
-
ProxyListFallbackSelector
public ProxyListFallbackSelector(ProxySelector delegate)
Constructor- Parameters:
delegate- the delegate to use.
-
ProxyListFallbackSelector
public ProxyListFallbackSelector(long retryAfterMs, ProxySelector delegate)Constructor- Parameters:
retryAfterMs- the "retry delay" as amount of milliseconds.delegate- the delegate to use.
-
-
Method Detail
-
connectFailed
public void connectFailed(URI uri, SocketAddress sa, IOException ioe)
connectFailed- Specified by:
connectFailedin classProxySelector- See Also:
ProxySelector.connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException)
-
select
public List<Proxy> select(URI uri)
select- Specified by:
selectin classProxySelector- See Also:
ProxySelector.select(java.net.URI)
-
-