public class PacProxySelector extends ProxySelector
Modifier and Type | Field and Description |
---|---|
static String |
PROXY_SERVICE |
Constructor and Description |
---|
PacProxySelector() |
Modifier and Type | Method and Description |
---|---|
void |
connectFailed(URI uri,
SocketAddress address,
IOException failure)
Called to indicate that a connection could not be established
to a proxy/socks server.
|
List<Proxy> |
select(URI uri)
Selects all the applicable proxies based on the protocol to
access the resource with and a destination address to access
the resource at.
|
getDefault, setDefault
public static final String PROXY_SERVICE
public List<Proxy> select(URI uri)
ProxySelector
socket://host:port
select
in class ProxySelector
uri
- The URI that a connection is required toProxy
;
when no proxy is available, the list will
contain one element of type
Proxy
that represents a direct connection.public void connectFailed(URI uri, SocketAddress address, IOException failure)
ProxySelector
ProxySelector.select(URI)
, using the address
and the IOException caught when trying to connect.connectFailed
in class ProxySelector
uri
- The URI that the proxy at sa failed to serve.address
- The socket address of the proxy/SOCKS serverfailure
- The I/O exception thrown when the connect failed.