Class FirewallingProxySelector
- java.lang.Object
-
- java.net.ProxySelector
-
- org.pentaho.reporting.designer.core.util.firewall.FirewallingProxySelector
-
public class FirewallingProxySelector extends ProxySelector
Todo: Document me! Date: 11.11.2009 Time: 21:50:46- Author:
- Thomas Morgner.
-
-
Constructor Summary
Constructors Constructor Description FirewallingProxySelector(ProxySelector defaultSelector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class java.net.ProxySelector
getDefault, of, setDefault
-
-
-
-
Constructor Detail
-
FirewallingProxySelector
public FirewallingProxySelector(ProxySelector defaultSelector)
-
-
Method Detail
-
select
public 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. The format of the URI is defined as follow:- http URI for http connections
- https URI for https connections
- ftp URI for ftp connections
socket://host:port
for tcp client sockets connections
- Specified by:
select
in classProxySelector
- Parameters:
uri
- The URI that a connection is required to- Returns:
- a List of Proxies. Each element in the the List is of type
Proxy
; when no proxy is available, the list will contain one element of typeProxy
that represents a direct connection. - Throws:
IllegalArgumentException
- if either argument is null
-
connectFailed
public void connectFailed(URI uri, SocketAddress sa, IOException ioe)
Called to indicate that a connection could not be established to a proxy/socks server. An implementation of this method can temporarily remove the proxies or reorder the sequence of proxies returned by select(String, String), using the address and they kind of IOException given.- Specified by:
connectFailed
in classProxySelector
- Parameters:
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.- Throws:
IllegalArgumentException
- if either argument is null
-
-