com.ning.http.client
Class ProxyServer

java.lang.Object
  extended by com.ning.http.client.ProxyServer

public class ProxyServer
extends Object

Represents a proxy server.


Nested Class Summary
static class ProxyServer.Protocol
           
 
Constructor Summary
ProxyServer(ProxyServer.Protocol protocol, String host, int port)
           
ProxyServer(ProxyServer.Protocol protocol, String host, int port, String principal, String password)
           
ProxyServer(String host, int port)
           
ProxyServer(String host, int port, String principal, String password)
           
 
Method Summary
static ProxyServer fromProxy(Proxy proxy)
          Convert from Java java.net.Proxy object.
 String getEncoding()
           
 String getHost()
           
 String getPassword()
           
 int getPort()
           
 String getPrincipal()
           
 ProxyServer.Protocol getProtocol()
           
 String getProtocolAsString()
           
 void setEncoding(String encoding)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxyServer

public ProxyServer(ProxyServer.Protocol protocol,
                   String host,
                   int port,
                   String principal,
                   String password)

ProxyServer

public ProxyServer(String host,
                   int port,
                   String principal,
                   String password)

ProxyServer

public ProxyServer(ProxyServer.Protocol protocol,
                   String host,
                   int port)

ProxyServer

public ProxyServer(String host,
                   int port)
Method Detail

getProtocol

public ProxyServer.Protocol getProtocol()

getProtocolAsString

public String getProtocolAsString()

getHost

public String getHost()

getPort

public int getPort()

getPrincipal

public String getPrincipal()

getPassword

public String getPassword()

fromProxy

public static final ProxyServer fromProxy(Proxy proxy)
Convert from Java java.net.Proxy object.

Parameters:
proxy -
Returns:
A ProxyServer object or null if the proxy object can not converted.

setEncoding

public void setEncoding(String encoding)

getEncoding

public String getEncoding()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010. All Rights Reserved.