Class SingleProxySelector
- java.lang.Object
-
- java.net.ProxySelector
-
- net.lenni0451.commons.httpclient.proxy.SingleProxySelector
-
public class SingleProxySelector extends java.net.ProxySelector
-
-
Constructor Summary
Constructors Constructor Description SingleProxySelector(java.net.Proxy proxy, java.lang.String username, java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)SingleProxySelectorreset(boolean resetProxySelector)Reset the default proxy selector and authenticator.java.util.List<java.net.Proxy>select(java.net.URI uri)SingleProxySelectorset(boolean setProxySelector)Set this proxy selector as default.
This also sets the authenticator if username and password are set.
-
-
-
Method Detail
-
set
public SingleProxySelector set(boolean setProxySelector)
Set this proxy selector as default.
This also sets the authenticator if username and password are set.- Parameters:
setProxySelector- If the default proxy selector should be set to this instance- Returns:
- This instance for chaining
-
reset
public SingleProxySelector reset(boolean resetProxySelector)
Reset the default proxy selector and authenticator.- Parameters:
resetProxySelector- If the default proxy selector should be reset to the original one- Returns:
- This instance for chaining
-
select
public java.util.List<java.net.Proxy> select(java.net.URI uri)
- Specified by:
selectin classjava.net.ProxySelector
-
connectFailed
public void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)- Specified by:
connectFailedin classjava.net.ProxySelector
-
-