communication
Class IPProcessIdentifier

java.lang.Object
  extended by communication.ProcessIdentifier
      extended by 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
 
Constructor Summary
IPProcessIdentifier(java.net.InetAddress padd, int port)
           
IPProcessIdentifier(int id, java.net.InetAddress padd, int port)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 java.net.InetAddress getIPadd()
           
 int getPort()
           
 int hashCode()
           
 void setIPadd(java.net.InetAddress padd)
           
 void setPort(int port)
           
 java.lang.String toString()
           
 
Methods inherited from class communication.ProcessIdentifier
getId, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IPadd

protected java.net.InetAddress IPadd
IP Address of the process


port

protected int port
Port of the socket of the process

Constructor Detail

IPProcessIdentifier

public IPProcessIdentifier(int id,
                           java.net.InetAddress padd,
                           int port)
Parameters:
id - the (supposed unique) identifier of the process
padd - the IP address of the process
port - the port of the socket of the process

IPProcessIdentifier

public IPProcessIdentifier(java.net.InetAddress padd,
                           int port)
Parameters:
padd -
port -
Method Detail

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