ProxySelector


ProxySelector java.net

Java 5.0

An implementation of this abstract class can be used to automatically select one or more Proxy objects to use to connect to a specified URL . Install an implementation of this class with the setDefault( ) method. URLConnection implementations use the installed ProxySelector , if there is one, and call select( ) to obtain a list of suitable Proxy objects for the connection. If a URLConnection cannot contact the proxy server specified in a Proxy object, it calls the connectFailed( ) method to notify the ProxySelector object of the failure.

This class is intended to be implemented by advanced users of java.net and is not for casual use.

 public abstract class  ProxySelector  {  // Public Constructors  public  ProxySelector  ( );  // Public Class Methods  public static ProxySelector  getDefault  ( );        public static void  setDefault  (ProxySelector  ps  );  // Public Instance Methods  public abstract void  connectFailed  (URI  uri  , SocketAddress  sa  ,  java.io.IOException  ioe  );        public abstract java.util.List<java.net.Proxy>  select  (URI  uri  );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net