Package org.apache.commons.httpclient
Class HttpHost
- java.lang.Object
 - 
- org.apache.commons.httpclient.HttpHost
 
 
- 
- All Implemented Interfaces:
 java.lang.Cloneable
- Direct Known Subclasses:
 ProxyHost
@Deprecated public class HttpHost extends java.lang.Object implements java.lang.CloneableDeprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.Holds all of the variables needed to describe an HTTP connection to a host. This includes remote host, port and protocol.- Since:
 - 3.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description HttpHost(java.lang.String hostname)Deprecated.Constructor for HttpHost.HttpHost(java.lang.String hostname, int port)Deprecated.Constructor for HttpHost.HttpHost(java.lang.String hostname, int port, Protocol protocol)Deprecated.Constructor for HttpHost.HttpHost(HttpHost httphost)Deprecated.Copy constructor for HttpHostHttpHost(URI uri)Deprecated.URI constructor for HttpHost. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Objectclone()Deprecated.booleanequals(java.lang.Object o)Deprecated.java.lang.StringgetHostName()Deprecated.Returns the host name (IP or DNS name).intgetPort()Deprecated.Returns the port.ProtocolgetProtocol()Deprecated.Returns the protocol.inthashCode()Deprecated.java.lang.StringtoString()Deprecated.java.lang.StringtoURI()Deprecated.Return the host uri. 
 - 
 
- 
- 
Constructor Detail
- 
HttpHost
public HttpHost(java.lang.String hostname, int port, Protocol protocol)Deprecated.Constructor for HttpHost.- Parameters:
 hostname- the hostname (IP or DNS name). Can benull.port- the port. Value-1can be used to set default protocol portprotocol- the protocol. Valuenullcan be used to set default protocol
 
- 
HttpHost
public HttpHost(java.lang.String hostname, int port)Deprecated.Constructor for HttpHost.- Parameters:
 hostname- the hostname (IP or DNS name). Can benull.port- the port. Value-1can be used to set default protocol port
 
- 
HttpHost
public HttpHost(java.lang.String hostname)
Deprecated.Constructor for HttpHost.- Parameters:
 hostname- the hostname (IP or DNS name). Can benull.
 
- 
HttpHost
public HttpHost(URI uri) throws URIException
Deprecated.URI constructor for HttpHost.- Parameters:
 uri- the URI.- Throws:
 URIException
 
- 
HttpHost
public HttpHost(HttpHost httphost)
Deprecated.Copy constructor for HttpHost- Parameters:
 httphost- the HTTP host to copy details from
 
 - 
 
- 
Method Detail
- 
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDeprecated.- Throws:
 java.lang.CloneNotSupportedException- See Also:
 Object.clone()
 
- 
getHostName
public java.lang.String getHostName()
Deprecated.Returns the host name (IP or DNS name).- Returns:
 - the host name (IP or DNS name), or 
nullif not set 
 
- 
getPort
public int getPort()
Deprecated.Returns the port.- Returns:
 - the host port, or 
-1if not set 
 
- 
getProtocol
public Protocol getProtocol()
Deprecated.Returns the protocol.- Returns:
 - The protocol.
 
 
- 
toURI
public java.lang.String toURI()
Deprecated.Return the host uri.- Returns:
 - The host uri.
 
 
- 
toString
public java.lang.String toString()
Deprecated.- Overrides:
 toStringin classjava.lang.Object- See Also:
 Object.toString()
 
- 
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
 equalsin classjava.lang.Object- See Also:
 Object.equals(java.lang.Object)
 
- 
hashCode
public int hashCode()
Deprecated.- Overrides:
 hashCodein classjava.lang.Object- See Also:
 Object.hashCode()
 
 - 
 
 -