org.objectweb.jonathan.apis.protocols.ip
Class IpSessionIdentifier
java.lang.Object
|
+--org.objectweb.jonathan.apis.protocols.ip.IpSessionIdentifier
- All Implemented Interfaces:
- SessionIdentifier
- public abstract class IpSessionIdentifier
- extends Object
- implements SessionIdentifier
IpSessionIdentifier is a specific
SessionIdentifier type for IP protocols. An IP session identifier contains
a host name, and a port
number.
|
Field Summary |
String |
hostname
Hostname of this session identifier. |
int |
port
Port number of this session identifier. |
|
Method Summary |
boolean |
equals(Object o)
Compares this object to the specified object.
|
int |
hashCode()
Returns a hash code value for this IpSessionIdentifier. |
String |
toString()
Returns a string representation of this session identifier. |
hostname
public String hostname
- Hostname of this session identifier.
port
public int port
- Port number of this session identifier.
IpSessionIdentifier
public IpSessionIdentifier(String hostname,
int port)
- Constructs a new IpSessionIdentifier with the specified host name and port
number.
- Parameters:
hostname - a host name;port - a port number;
IpSessionIdentifier
public IpSessionIdentifier()
- Constructs a new empty IpSessionIdentifier.
hashCode
public int hashCode()
- Returns a hash code value for this IpSessionIdentifier.
- Overrides:
hashCode in class Object
- Returns:
- a hash code value for this object.
equals
public boolean equals(Object o)
- Compares this object to the specified object.
The result is true if and only if the argument is not null and is a
IpSessionIdentifier object that has the same host name and port number.
- Overrides:
equals in class Object
- Parameters:
obj - the object to compare with.- Returns:
- true if the objects are the same; false otherwise.
toString
public String toString()
- Returns a string representation of this session identifier.
- Overrides:
toString in class Object
- Returns:
- a string representation of this session identifier.