cgl.narada.protocol
Class ProtocolIDFactory

java.lang.Object
  extended by cgl.narada.protocol.ProtocolIDFactory

public class ProtocolIDFactory
extends Object

Protocol packets, especially those notifying the addition, deletion of gateways, nodes and address generation requests need to have unique ID associated with it. This class is responsible for the generation of unique IDs and serves as a factory for the generation of these ID's.


Constructor Summary
ProtocolIDFactory(NodeAddress nodeAddress, short incarnation)
          Initializes the protocolID factory.
 
Method Summary
 ProtocolID getProtocolID()
          This method returns the next logical ProtocolID from the IDFactory.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolIDFactory

public ProtocolIDFactory(NodeAddress nodeAddress,
                         short incarnation)
Initializes the protocolID factory. We need both the nodeAddress of the system and the incarnation associated with the node to uniquely create protocolID's.

Parameters:
nodeAddress - The node address of the system.
incarnation - The incarnation associated with the node .
Method Detail

getProtocolID

public ProtocolID getProtocolID()
This method returns the next logical ProtocolID from the IDFactory. The ID's generated are unique system wide, and are used to uniquely identify new connections that are added, and so on.

Returns:
A unique protocolID.

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project