com.sleepycat.je.rep.utilint
Class HostPortPair

java.lang.Object
  extended by com.sleepycat.je.rep.utilint.HostPortPair

public class HostPortPair
extends Object

Encapsulates the functionality around dealing with HostPort string pairs having the format: host[:port]


Field Summary
static String SEPARATOR
           
 
Constructor Summary
HostPortPair()
           
 
Method Summary
static InetSocketAddress getSocket(String hostPortPair)
          Parses a hostPort pair into the socket it represents.
static Set<InetSocketAddress> getSockets(String hostPortPairs)
          Parses hostPort pairs into sockets it represents.
static String getString(String host, int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static final String SEPARATOR
See Also:
Constant Field Values
Constructor Detail

HostPortPair

public HostPortPair()
Method Detail

getSocket

public static InetSocketAddress getSocket(String hostPortPair)
Parses a hostPort pair into the socket it represents.

Parameters:
hostPortPair -
Returns:
socket address for this host pair
Throws:
IllegalArgumentException - via ReplicatedEnvironment and Monitor ctors.

getSockets

public static Set<InetSocketAddress> getSockets(String hostPortPairs)
Parses hostPort pairs into sockets it represents.

Parameters:
hostPortPair -
Returns:
a set of socket addresses for these host pairs

getString

public static String getString(String host,
                               int port)


Copyright (c) 2004-2010 Oracle. All rights reserved.