Class FixedProxySelector
- java.lang.Object
-
- java.net.ProxySelector
-
- com.github.markusbernhardt.proxy.selector.fixed.FixedProxySelector
-
- Direct Known Subclasses:
FixedSocksSelector
public class FixedProxySelector extends ProxySelector
This proxy selector is configured with a fixed proxy. This proxy will be returned for all URIs passed to the select method.- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
-
Constructor Summary
Constructors Constructor Description FixedProxySelector(String proxyHost, int proxyPort)ConstructorFixedProxySelector(Proxy proxy)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
-
FixedProxySelector
public FixedProxySelector(Proxy proxy)
Constructor- Parameters:
proxy- the proxy to use.
-
FixedProxySelector
public FixedProxySelector(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(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)
-
-