Save This Page
Home » HttpComponents-Core-4.0.1 » org.apache.http » [javadoc | source]
org.apache.http
public final class: HttpHost [javadoc | source]
java.lang.Object
   org.apache.http.HttpHost

All Implemented Interfaces:
    Cloneable, Serializable

Direct Known Subclasses:
    ProxyHost

Holds all of the variables needed to describe an HTTP connection to a host. This includes remote host name, port and scheme.
Field Summary
public static final  String DEFAULT_SCHEME_NAME    The default scheme is "http". 
protected final  String hostname    The host to use. 
protected final  String lcHostname    The lowercase host, for #equals and #hashCode
protected final  int port    The port to use. 
protected final  String schemeName    The scheme 
Constructor:
 public HttpHost(String hostname) 
    Creates a new HttpHost , with default scheme and port.
    Parameters:
    hostname - the hostname (IP or DNS name)
 public HttpHost(HttpHost httphost) 
    Parameters:
    httphost - the HTTP host to copy details from
 public HttpHost(String hostname,
    int port) 
    Creates a new HttpHost , with default scheme.
    Parameters:
    hostname - the hostname (IP or DNS name)
    port - the port number. -1 indicates the scheme default port.
 public HttpHost(String hostname,
    int port,
    String scheme) 
    Creates a new HttpHost , specifying all values. Constructor for HttpHost.
    Parameters:
    hostname - the hostname (IP or DNS name)
    port - the port number. -1 indicates the scheme default port.
    scheme - the name of the scheme. null indicates the default scheme
Method from org.apache.http.HttpHost Summary:
clone,   equals,   getHostName,   getPort,   getSchemeName,   hashCode,   toHostString,   toString,   toURI
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.http.HttpHost Detail:
 public Object clone() throws CloneNotSupportedException 
 public boolean equals(Object obj) 
 public String getHostName() 
    Returns the host name.
 public int getPort() 
    Returns the port.
 public String getSchemeName() 
    Returns the scheme name.
 public int hashCode() 
 public String toHostString() 
    Obtains the host string, without scheme prefix.
 public String toString() 
 public String toURI() 
    Return the host URI, as a string.