public final class HostAndPort extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
asInetSocketAddress() |
boolean |
equals(Object o) |
static HostAndPort |
fromParts(String host,
int port) |
static HostAndPort |
fromString(String hostPortStr,
int defaultPort) |
String |
getHost() |
int |
getPort() |
int |
getPortOrDefault(int defaultPort) |
int |
hashCode() |
boolean |
hasPort() |
static List<HostAndPort> |
hostsFromString(String hostPortStr,
int defaultPort) |
String |
toString() |
public boolean hasPort()
public int getPort()
public int getPortOrDefault(int defaultPort)
public String getHost()
public InetSocketAddress asInetSocketAddress()
public static List<HostAndPort> hostsFromString(String hostPortStr, int defaultPort)
public static HostAndPort fromString(String hostPortStr, int defaultPort)
public static HostAndPort fromParts(String host, int port)
Copyright © 2016. All rights reserved.