cgl.narada.protocol
Class NodeAdditionProtocolHelper

java.lang.Object
  extended by cgl.narada.protocol.NodeAdditionProtocolHelper
All Implemented Interfaces:
ProtocolDebugFlags

public class NodeAdditionProtocolHelper
extends Object
implements ProtocolDebugFlags

This class serves as a helper to the NodeAdditionProtocol, and is responsible the creation of various kinds of request and response packet that exist within the Node Organization Protocol


Field Summary
 
Fields inherited from interface cgl.narada.protocol.ProtocolDebugFlags
BrokerLocatorCommunicator_Debug, ClientConnectionHandler_Debug, Connection_Debug, ConnectionPropagation_Debug, Destinations_Debug, DuplicateDetection_Debug, EventBuffer_Debug, EventRoutingProtocol_Debug, Gateway_Debug, GatewayInfo_Debug, GatewayPropagation_Debug, JmsProfilePropagation_Debug, LinkCostMatrix_Debug, NodeAdditionProtocol_Debug, NodeAddress_Debug, Path_Debug, PersistentEventRouting_Debug, ProfilePropagationProtocol_Debug, ProtocolException_Debug, ProtocolHandler_Debug, ProtocolID_Debug, ProtocolIDFactory_Debug, RoutingCache_Debug, RtpEventRoutingProtocol_Debug, RtpProfilePropagation_Debug, SecureMessageRouting_Debug, TagValueEventRoutingProtocol_Debug, TagValueProfilePropagation_Debug, XmlEventRoutingProtocol_Debug, XPathProfilePropagation_Debug
 
Constructor Summary
NodeAdditionProtocolHelper()
           
 
Method Summary
 byte[] constructNodeAdddressRequest(int requestedLevel, int systemLevel, ProtocolID requestId, Destinations origin, Destinations toReach, Destinations traversedSoFar)
           
 byte[] constructNodeAdditionRequest(int[] levels, boolean from)
          This method is responsible for constructing the node addition request.
 byte[] constructNodeAdditionResponse(ProtocolID requestId, int requestedLevel, int systemLevel, NodeAddress addressAssigned, NodeAddress assignedBy, NodeAddress connectedTo)
           
 byte[] constructNodeAddressResponse(int requestedLevel, int systemLevel, ProtocolID requestId, NodeAddress addressAssigned, NodeAddress assignedBy, Destinations toReach, Destinations traversedSoFar)
           
 void routeNodeAddressResponse(NodeAddress assignedAddress, int level, NodeAddress toAddress)
          When an address has been created it needs to be routed back to the node where this node was created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeAdditionProtocolHelper

public NodeAdditionProtocolHelper()
Method Detail

constructNodeAdditionRequest

public byte[] constructNodeAdditionRequest(int[] levels,
                                           boolean from)
This method is responsible for constructing the node addition request. A node specifies the kind of gateways it seeks to be in the integer array, while specifying the to/from charachteristics of the node addition request

Parameters:
levels - - Integer array specifying the kind of gateways the node seeks to be.
from - - Speicification of the to/from relationship for node addition.

constructNodeAdditionResponse

public byte[] constructNodeAdditionResponse(ProtocolID requestId,
                                            int requestedLevel,
                                            int systemLevel,
                                            NodeAddress addressAssigned,
                                            NodeAddress assignedBy,
                                            NodeAddress connectedTo)

constructNodeAdddressRequest

public byte[] constructNodeAdddressRequest(int requestedLevel,
                                           int systemLevel,
                                           ProtocolID requestId,
                                           Destinations origin,
                                           Destinations toReach,
                                           Destinations traversedSoFar)

constructNodeAddressResponse

public byte[] constructNodeAddressResponse(int requestedLevel,
                                           int systemLevel,
                                           ProtocolID requestId,
                                           NodeAddress addressAssigned,
                                           NodeAddress assignedBy,
                                           Destinations toReach,
                                           Destinations traversedSoFar)

routeNodeAddressResponse

public void routeNodeAddressResponse(NodeAddress assignedAddress,
                                     int level,
                                     NodeAddress toAddress)
When an address has been created it needs to be routed back to the node where this node was created.



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