Methods Summary |
---|
public abstract void | connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe)Notifies the {@code ProxySelector} that a connection to the proxy server
could not be established. A concrete implementation should upon this
notification maintain the list of available proxies, since an updated
version should be provided by {@code select()}.
|
public static java.net.ProxySelector | getDefault()Gets the default {@code ProxySelector} of the system.
SecurityManager sm = System.getSecurityManager();
if (null != sm) {
sm.checkPermission(getProxySelectorPermission);
}
return defaultSelector;
|
public abstract java.util.List | select(java.net.URI uri)Gets all applicable proxies based on the accessing protocol of {@code
uri}. The format of URI is defined as below:
http URI stands for http connection.
https URI stands for https connection.
ftp URI stands for ftp connection.
socket:://ip:port URI stands for tcp client sockets connection.
|
public static void | setDefault(java.net.ProxySelector selector)Sets the default {@code ProxySelector} of the system. Removes the system
default {@code ProxySelector} if the parameter {@code selector} is set to
{@code null}.
SecurityManager sm = System.getSecurityManager();
if (null != sm) {
sm.checkPermission(setProxySelectorPermission);
}
defaultSelector = selector;
|