Class Host
java.lang.Object
org.apache.pekko.http.javadsl.model.Host
- Direct Known Subclasses:
- Uri.Host
Represents a host in a URI or a Host header. The host can either be empty or be represented by an
 IPv4 or IPv6 address or by a host name.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract Stringaddress()Returns a String representation of the address.static HostParse the given Host string using the default charset and parsing-mode.static Hostcreate(String string, Charset charset, Uri.ParsingMode parsingMode) Parse the given Host string using the given charset and parsing-mode.static Hostcreate(String string, Uri.ParsingMode parsingMode) Parse the given Host string using the given charset and the default parsing-mode.abstract Iterable<InetAddress>Returns an Iterable of InetAddresses represented by this Host.abstract booleanisEmpty()abstract booleanisIPv4()abstract booleanisIPv6()abstract boolean
- 
Field Details- 
EMPTYThe constant representing an empty Host.
 
- 
- 
Constructor Details- 
Hostpublic Host()
 
- 
- 
Method Details- 
addressReturns a String representation of the address.
- 
isEmptypublic abstract boolean isEmpty()
- 
isIPv4public abstract boolean isIPv4()
- 
isIPv6public abstract boolean isIPv6()
- 
isNamedHostpublic abstract boolean isNamedHost()
- 
getInetAddressesReturns an Iterable of InetAddresses represented by this Host. If this Host is empty the returned Iterable will be empty. If this is an IP address the Iterable will contain this address. If this Host is represented by a host name, the name will be looked up and return all found addresses for this name.
- 
createParse the given Host string using the default charset and parsing-mode.
- 
createParse the given Host string using the given charset and the default parsing-mode.
- 
createParse the given Host string using the given charset and parsing-mode.
 
-