|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.HttpHost
public class HttpHost
Holds all of the variables needed to describe an HTTP connection to a host. This includes remote host name, port and scheme.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_SCHEME_NAME
The default scheme is "http". |
protected java.lang.String |
hostname
The host to use. |
protected java.lang.String |
lcHostname
The lowercase host, for equals(java.lang.Object) and hashCode() . |
protected int |
port
The port to use. |
protected java.lang.String |
schemeName
The scheme |
Constructor Summary | |
---|---|
HttpHost(HttpHost httphost)
Copy constructor for HttpHost . |
|
HttpHost(java.lang.String hostname)
Creates a new HttpHost , with default scheme and port. |
|
HttpHost(java.lang.String hostname,
int port)
Creates a new HttpHost , with default scheme. |
|
HttpHost(java.lang.String hostname,
int port,
java.lang.String scheme)
Creates a new HttpHost , specifying all values. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getHostName()
Returns the host name. |
int |
getPort()
Returns the port. |
java.lang.String |
getSchemeName()
Returns the scheme name. |
int |
hashCode()
|
java.lang.String |
toHostString()
Obtains the host string, without scheme prefix. |
java.lang.String |
toString()
|
java.lang.String |
toURI()
Return the host URI, as a string. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_SCHEME_NAME
protected final java.lang.String hostname
protected final java.lang.String lcHostname
equals(java.lang.Object)
and hashCode()
.
protected final int port
protected final java.lang.String schemeName
Constructor Detail |
---|
public HttpHost(java.lang.String hostname, int port, java.lang.String scheme)
HttpHost
, specifying all values.
Constructor for HttpHost.
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
public HttpHost(java.lang.String hostname, int port)
HttpHost
, with default scheme.
hostname
- the hostname (IP or DNS name)port
- the port number.
-1
indicates the scheme default port.public HttpHost(java.lang.String hostname)
HttpHost
, with default scheme and port.
hostname
- the hostname (IP or DNS name)public HttpHost(HttpHost httphost)
HttpHost
.
httphost
- the HTTP host to copy details fromMethod Detail |
---|
public java.lang.String getHostName()
public int getPort()
-1
if not setpublic java.lang.String getSchemeName()
public java.lang.String toURI()
public java.lang.String toHostString()
localhost:8080
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |