communication
Class IPProcessIdentifier
java.lang.Object
communication.ProcessIdentifier
communication.IPProcessIdentifier
- All Implemented Interfaces:
- java.io.Serializable
public class IPProcessIdentifier
- extends ProcessIdentifier
Identification of a process in the IP context. In addition to the identifier attribute,
adds a couple of IP address and port (the address of a socket)
- See Also:
- Serialized Form
Field Summary |
protected java.net.InetAddress |
IPadd
IP Address of the process |
protected int |
port
Port of the socket of the process |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
IPadd
protected java.net.InetAddress IPadd
- IP Address of the process
port
protected int port
- Port of the socket of the process
IPProcessIdentifier
public IPProcessIdentifier(int id,
java.net.InetAddress padd,
int port)
- Parameters:
id
- the (supposed unique) identifier of the processpadd
- the IP address of the processport
- the port of the socket of the process
IPProcessIdentifier
public IPProcessIdentifier(java.net.InetAddress padd,
int port)
- Parameters:
padd
- port
-
getIPadd
public java.net.InetAddress getIPadd()
- Returns:
- the IP address
setIPadd
public void setIPadd(java.net.InetAddress padd)
- Parameters:
padd
- the IP address to set
getPort
public int getPort()
- Returns:
- the port
setPort
public void setPort(int port)
- Parameters:
port
- the port to set
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException