public class HttpHost
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
HttpHost(HttpHost httphost)
Copy constructor for HttpHost
|
HttpHost(java.lang.String hostname)
Constructor for HttpHost.
|
HttpHost(java.lang.String hostname,
int port)
Constructor for HttpHost.
|
HttpHost(java.lang.String hostname,
int port,
org.apache.commons.httpclient.protocol.Protocol protocol)
Constructor for HttpHost.
|
HttpHost(org.apache.commons.httpclient.URI uri)
URI constructor for HttpHost.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getHostName()
Returns the host name (IP or DNS name).
|
int |
getPort()
Returns the port.
|
org.apache.commons.httpclient.protocol.Protocol |
getProtocol()
Returns the protocol.
|
int |
hashCode() |
java.lang.String |
toString() |
java.lang.String |
toURI()
Return the host uri.
|
public HttpHost(java.lang.String hostname,
int port,
org.apache.commons.httpclient.protocol.Protocol protocol)
hostname - the hostname (IP or DNS name). Can be null.port - the port. Value -1 can be used to set default protocol portprotocol - the protocol. Value null can be used to set default protocolpublic HttpHost(java.lang.String hostname,
int port)
hostname - the hostname (IP or DNS name). Can be null.port - the port. Value -1 can be used to set default protocol portpublic HttpHost(java.lang.String hostname)
hostname - the hostname (IP or DNS name). Can be null.public HttpHost(org.apache.commons.httpclient.URI uri)
throws org.apache.commons.httpclient.URIException
uri - the URI.org.apache.commons.httpclient.URIExceptionpublic HttpHost(HttpHost httphost)
httphost - the HTTP host to copy details frompublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionObject.clone()public java.lang.String getHostName()
null if not setpublic int getPort()
-1 if not setpublic org.apache.commons.httpclient.protocol.Protocol getProtocol()
public java.lang.String toURI()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()Copyright © 2010 - 2023 Adobe. All Rights Reserved