public class HostPortPair
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SEPARATOR |
Constructor and Description |
---|
HostPortPair() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getHostname(java.lang.String hostPortPair)
Parses and returns the hostname string of a hostport pair
|
static int |
getPort(java.lang.String hostPortPair)
Parses and returns the port of a hostport pair
|
static java.net.InetSocketAddress |
getSocket(java.lang.String hostPortPair)
Parses a hostPort pair into the socket it represents.
|
static java.util.Set<java.net.InetSocketAddress> |
getSockets(java.lang.String hostPortPairs)
Parses hostPort pairs into sockets it represents.
|
static java.lang.String |
getString(java.lang.String host,
int port) |
public static final java.lang.String SEPARATOR
public static java.net.InetSocketAddress getSocket(java.lang.String hostPortPair)
hostPortPair
- java.lang.IllegalArgumentException
- via ReplicatedEnvironment and Monitor
ctors.public static java.util.Set<java.net.InetSocketAddress> getSockets(java.lang.String hostPortPairs)
hostPortPairs
- public static java.lang.String getString(java.lang.String host, int port)
public static java.lang.String getHostname(java.lang.String hostPortPair)
public static int getPort(java.lang.String hostPortPair)
Copyright (c) 2004-2012 Oracle. All rights reserved.