public class FirewallingProxySelector extends ProxySelector
Constructor and Description |
---|
FirewallingProxySelector(ProxySelector defaultSelector) |
Modifier and Type | Method and Description |
---|---|
void |
connectFailed(URI uri,
SocketAddress sa,
IOException ioe)
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 FirewallingProxySelector(ProxySelector defaultSelector)
public List<Proxy> select(URI uri)
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.IllegalArgumentException
- if either argument is nullpublic void connectFailed(URI uri, SocketAddress sa, IOException ioe)
connectFailed
in class ProxySelector
uri
- The URI that the proxy at sa failed to serve.sa
- The socket address of the proxy/SOCKS serverioe
- The I/O exception thrown when the connect failed.IllegalArgumentException
- if either argument is nullCopyright © 2017 Hitachi Vantara. All rights reserved.