public interface HostAndPort
<host name, port>.
|Modifier and Type||Method and Description|
Returns the host name.
Create a new
Returns the port.
static HostAndPort of(java.lang.String host, int port)
HostAndPortobject for the specified values.
host- host name
static HostAndPort of(java.net.InetSocketAddress address)
Note that creation of a
InetSocketAddress may use the JDK's blocking DNS resolution. Take care to only
create these objects if you intend to use the JDK's blocking DNS resolution, and you are safe to block.