Class FixedProxySelector
- java.lang.Object
-
- java.net.ProxySelector
-
- com.github.markusbernhardt.proxy.selector.fixed.FixedProxySelector
-
- Direct Known Subclasses:
FixedSocksSelector
public class FixedProxySelector extends java.net.ProxySelectorThis proxy selector is configured with a fixed proxy. This proxy will be returned for all URIs passed to the select method.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.net.Proxy>proxyList
-
Constructor Summary
Constructors Constructor Description FixedProxySelector(java.lang.String proxyHost, int proxyPort)ConstructorFixedProxySelector(java.net.Proxy proxy)Constructor
-
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)connectFailedjava.util.List<java.net.Proxy>select(java.net.URI uri)selectjava.lang.StringtoString()
-
-
-
Constructor Detail
-
FixedProxySelector
public FixedProxySelector(java.net.Proxy proxy)
Constructor- Parameters:
proxy- the proxy to use.
-
FixedProxySelector
public FixedProxySelector(java.lang.String proxyHost, int proxyPort)Constructor- Parameters:
proxyHost- the host name or IP address of the proxy to use.proxyPort- the port of the proxy.
-
-
Method Detail
-
connectFailed
public void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)connectFailed- Specified by:
connectFailedin classjava.net.ProxySelector- See Also:
ProxySelector.connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException)
-
select
public java.util.List<java.net.Proxy> select(java.net.URI uri)
select- Specified by:
selectin classjava.net.ProxySelector- See Also:
ProxySelector.select(java.net.URI)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-