public class HostID
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
HostID(int port)
Create a new node identifier.
|
HostID(java.lang.String host,
int port)
Create a new node identifier.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(HostID id)
Check for equality with another node identifier.
|
java.lang.String |
getHost()
Get host name for this node identifier.
|
int |
getPort()
Get port number for this node identifier.
|
java.lang.String |
toString()
Convert this node identifier to a
human readable string.
|
public HostID(java.lang.String host, int port) throws java.lang.Exception
host
- Host name.port
- Port number.java.lang.Exception
public HostID(int port) throws java.lang.Exception
port
- Port numer.java.lang.Exception
public int getPort()
public java.lang.String getHost()
public boolean equals(HostID id)
public java.lang.String toString()
toString
in class java.lang.Object