org.jppf.utils
Class HostPort

java.lang.Object
  extended by org.jppf.utils.Pair<String,Integer>
      extended by org.jppf.utils.HostPort
All Implemented Interfaces:
Serializable

public class HostPort
extends Pair<String,Integer>

Instances of this class represent a TCP host:port combination.

Author:
Laurent Cohen
See Also:
Serialized Form

Constructor Summary
HostPort(String host, Integer port)
          Initialize this HostPort with the specified host name and port number.
 
Method Summary
 String host()
          Get the host name.
 int port()
          Get the port number.
 String toString()
          Get a string representation of this object.
 
Methods inherited from class org.jppf.utils.Pair
equals, first, hashCode, second
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HostPort

public HostPort(String host,
                Integer port)
Initialize this HostPort with the specified host name and port number.

Parameters:
host - the host to use.
port - the port number.
Method Detail

host

public String host()
Get the host name.

Returns:
the host as a string.

port

public int port()
Get the port number.

Returns:
the port as an int.

toString

public String toString()
Get a string representation of this object.

Overrides:
toString in class Object
Returns:
a string formatted as host:port.
See Also:
Object.toString()


Copyright © 2005-2010 JPPF Team.