org.jppf.utils
Class HostPort
java.lang.Object
org.jppf.utils.Pair<String,Integer>
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. |
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.
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.