Build 1.0_r1(from source)

java.net
Class ProxySelectorImpl

java.lang.Object
  extended by java.net.ProxySelector
      extended by java.net.ProxySelectorImpl

 class ProxySelectorImpl
extends ProxySelector

Default implementation for ProxySelector


Constructor Summary
ProxySelectorImpl()
           
 
Method Summary
 void connectFailed(URI uri, SocketAddress sa, IOException ioe)
          If the connection can not be established to the proxy server, this method will be called.
 List<Proxy> select(URI uri)
          Gets applicable proxies based on the accessing protocol of uri.
 
Methods inherited from class java.net.ProxySelector
getDefault, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxySelectorImpl

public ProxySelectorImpl()
Method Detail

connectFailed

public void connectFailed(URI uri,
                          SocketAddress sa,
                          IOException ioe)
Description copied from class: ProxySelector
If the connection can not be established to the proxy server, this method will be called. An implementation may adjust proxy the sequence of proxies returned by select(String, String).

Specified by:
connectFailed in class ProxySelector
Parameters:
uri - the URI that the connection fails to connect to.
sa - SocketAddress of the proxy.
ioe - The IOException which is thrown during connection establishment.

select

public List<Proxy> select(URI uri)
Description copied from class: ProxySelector
Gets applicable proxies based on the accessing protocol of 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.
  • Specified by:
    select in class ProxySelector
    Parameters:
    uri - the destination URI object.
    Returns:
    a list contains all applicable proxies. If no proxy is available, returns a list only contains one element Proxy.NO_PROXY.

    Build 1.0_r1(from source)

    Please submit a feedback, bug or feature