Package akka.http.javadsl.model
Class Host
java.lang.Object
akka.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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
address()
Returns a String representation of the address.static Host
Parse the given Host string using the default charset and parsing-mode.static Host
create
(String string, Uri.ParsingMode parsingMode) Parse the given Host string using the given charset and the default parsing-mode.static Host
create
(String string, Charset charset, Uri.ParsingMode parsingMode) Parse the given Host string using the given charset and parsing-mode.abstract Iterable<InetAddress>
Returns an Iterable of InetAddresses represented by this Host.abstract boolean
isEmpty()
abstract boolean
isIPv4()
abstract boolean
isIPv6()
abstract boolean
-
Field Details
-
EMPTY
The constant representing an empty Host.
-
-
Constructor Details
-
Host
public Host()
-
-
Method Details
-
address
Returns a String representation of the address. -
isEmpty
public abstract boolean isEmpty() -
isIPv4
public abstract boolean isIPv4() -
isIPv6
public abstract boolean isIPv6() -
isNamedHost
public abstract boolean isNamedHost() -
getInetAddresses
Returns 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. -
create
Parse the given Host string using the default charset and parsing-mode. -
create
Parse the given Host string using the given charset and the default parsing-mode. -
create
Parse the given Host string using the given charset and parsing-mode.
-