com.bankframe.services.notification
Class Node

java.lang.Object
  extended by com.bankframe.services.notification.Node
All Implemented Interfaces:
Serializable

public class Node
extends Object
implements Serializable

This class encapsulates a nodes attributes. This class is made mutable via the getters/setters defined.

See Also:
Serialized Form

Field Summary
static String DP_NAME
           
static String ID_KEY
           
static String IP_KEY
           
static String PORT_KEY
           
 
Constructor Summary
Node()
          Default constructor
Node(DataPacket thisPacket)
          This constructor is a convenient constructor allowing for the creation of a Node directly from a datapacket
Node(String ID, String IP, String PORT)
          Constructor
 
Method Summary
 String getID()
          This getter returns the ID attribute
 String getIP()
          This getter returns the IP attribute
 String getPORT()
          This getter returns the PORT attribute
 void setID(String ID)
          This method sets the ID attribute
 void setIP(String IP)
          This method sets the IP attribute
 void setPORT(String PORT)
          This method sets the PORT attribute
 DataPacket toDataPacket()
          Returns a datapacket representation of the node class
 String toString()
          This method overwrites the behaviour of the java.lang.Object.toString() to return a String representation of the atttributes of the node class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_KEY

public static final String ID_KEY
See Also:
Constant Field Values

IP_KEY

public static final String IP_KEY
See Also:
Constant Field Values

PORT_KEY

public static final String PORT_KEY
See Also:
Constant Field Values

DP_NAME

public static final String DP_NAME
See Also:
Constant Field Values
Constructor Detail

Node

public Node()
Default constructor


Node

public Node(String ID,
            String IP,
            String PORT)
Constructor

Parameters:
ID - String
IP - String
PORT - String

Node

public Node(DataPacket thisPacket)
This constructor is a convenient constructor allowing for the creation of a Node directly from a datapacket

Parameters:
thisPacket - DataPacket
Method Detail

getID

public String getID()
This getter returns the ID attribute

Returns:
String

getIP

public String getIP()
This getter returns the IP attribute

Returns:
String

getPORT

public String getPORT()
This getter returns the PORT attribute

Returns:
String

setID

public void setID(String ID)
This method sets the ID attribute

Parameters:
ID - String

setIP

public void setIP(String IP)
This method sets the IP attribute

Parameters:
IP - String

setPORT

public void setPORT(String PORT)
This method sets the PORT attribute

Parameters:
PORT - String

toString

public String toString()
This method overwrites the behaviour of the java.lang.Object.toString() to return a String representation of the atttributes of the node class

Overrides:
toString in class Object

toDataPacket

public DataPacket toDataPacket()
Returns a datapacket representation of the node class

Returns:
DataPacket


Copyright © 2005, 2007, Oracle. All rights reserved.