Package org.apache.hc.core5.net
Class Host
java.lang.Object
org.apache.hc.core5.net.Host
- All Implemented Interfaces:
Serializable,NamedEndpoint
@Contract(threading=IMMUTABLE)
public final class Host
extends Object
implements NamedEndpoint, Serializable
Component that holds all details needed to describe a network connection
to a host. This includes remote host name and port.
- Since:
- 5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Host
-
-
Method Details
-
create
- Throws:
URISyntaxException
-
getHostName
Description copied from interface:NamedEndpointReturns name (IP or DNS name).- Specified by:
getHostNamein interfaceNamedEndpoint- Returns:
- the host name (IP or DNS name)
-
getPort
public int getPort()Description copied from interface:NamedEndpointReturns the port.- Specified by:
getPortin interfaceNamedEndpoint- Returns:
- the host port, or
-1if not set
-
equals
-
hashCode
public int hashCode() -
toString
-