FileDocCategorySizeDatePackage
LocalProxySelector.javaAPI DocExample730Sun Dec 12 10:52:08 GMT 2004None

LocalProxySelector

public class LocalProxySelector extends ProxySelector

Fields Summary
private List
failed
Constructors Summary
Methods Summary
public voidconnectFailed(java.net.URI uri, java.net.SocketAddress address, java.io.IOException ex)

    failed.add(uri);
  
public java.util.Listselect(java.net.URI uri)

  
      
    
    List<Proxy> result = new ArrayList<Proxy>();
    if (failed.contains(uri) 
      || "http".equalsIgnoreCase(uri.getScheme())) {
        result.add(Proxy.NO_PROXY);
    }
    else {
        SocketAddress proxyAddress 
          = new InetSocketAddress( "proxy.example.com", 8000);
        Proxy proxy = new Proxy(Proxy.Type.HTTP, proxyAddress);
        result.add(proxy);
    }
    
    return result;