org.apache.commons.httpclient

Class ProxyHost

Implemented Interfaces:
Cloneable

public class ProxyHost
extends HttpHost

Holds all of the variables needed to describe an HTTP connection to a proxy. Proxy hosts always use plain HTTP connection when communicating with clients.
Since:
3.0

Constructor Summary

ProxyHost(String hostname)
Constructor for HttpHost.
ProxyHost(String hostname, int port)
Constructor for ProxyHost.
ProxyHost(ProxyHost httpproxy)
Copy constructor for HttpHost

Method Summary

Object
clone()

Methods inherited from class org.apache.commons.httpclient.HttpHost

clone, equals, getHostName, getPort, getProtocol, hashCode, toString, toURI

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ProxyHost

public ProxyHost(String hostname)
Constructor for HttpHost.
Parameters:
hostname - the hostname (IP or DNS name). Can be null.

ProxyHost

public ProxyHost(String hostname,
                 int port)
Constructor for ProxyHost.
Parameters:
hostname - the hostname (IP or DNS name). Can be null.
port - the port. Value -1 can be used to set default protocol port
Usages and Demos :

View More Examples of ProxyHost(String hostname,int port)
   1:         {
   2:             config.setProxyHost(new ProxyHost(theProxyHost, theProxyPort == null ? -1 : theProxyPort.intValue()));
   3:         }
   4:     }

View Full Code Here
   1:     
   2:     private static final ProxyHost NO_PROXY_HOST = new ProxyHost("",80);
   3:     
   4:         ...
   5:                         }
   6:                         result = new ProxyHost(proxyIP, proxyPort);
   7:                     } else {
   8:         ...
   9:                 }
  10:                 result = new ProxyHost(proxyIP, proxyPort);
  11:             }

View Full Code Here

ProxyHost

public ProxyHost(ProxyHost httpproxy)
Copy constructor for HttpHost
Parameters:
httpproxy - the HTTP host to copy details from

Method Details

clone

public Object clone()
            throws CloneNotSupportedException
Overrides:
clone in interface HttpHost