- All Implemented Interfaces:
public class NodeAdditionProtocol
- extends Object
- implements ProtocolDebugFlags
This call is responsible for the node addtion protocol. Specific
responsibilities for this class include the following
- Handle the requests for node additions
Consistent with the connection vector semantics and the IP
- Construct replies to the node in question.
- This could include providing a list of gateways to the nodes,
in case the requesting node seeks a TO relationship with the node
- Replies should indicate the status of the request, whether it failed,
succeeded or if its simply giving a list of other gateways that the
requesting node may try to connect to.
- Handle replies
- In case of success, update the logical address
- In the case of request forwarding, construct a new request to the
client in the original reply.
- In case of failures, initiate strategy to locate a new node.
- This is THE MOST IMPORTANT - In the case of a success, all the nodes
need to have their logical addressess updated, this would call for
also updating the addresses of the client nodes that have been
attached to the server nodes.
|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
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public NodeAdditionProtocol(NodeAddress nodeAddress,
public void setProtocolHandler(ProtocolHandler protocolHandler)
public void setNodeAddress(NodeAddress nodeAddress)
public void setAddressAssignerForLevel(int level)
- This method sets this node to be the node assigner at a certain level.
level - The level for which this node is the address assigner.
public void processNodeAddressRequest(byte nodeAddressRequest)
- Not all addresses can be assigned at the node which has received a node
addition request. This request thus needs to be forwarded to the node
which is responsible for assigning addresses within a certain level
As a general rule 22.214.171.124 is responsible for the assigning addresses to
clusters in 1.1.1 and super clusters in 1.1 ....
while 126.96.36.199 is responsible for assigning addresses to nodes in the
level indicates a request for assigning the address at level-l
This also rules out sending this request over hops with level > than
fromAddress - This includes routing information from level-0
upwards till level for which an address is requested.
public void processNodeAddressResponse(byte nodeAddressResponse)
public void forwardNodeAddressResponse(byte nodeAddressResponse)
public void forwardNodeAddressRequest(int requestedLevel,
public void processNodeAdditionRequest(String node,
- Process the node addition request. This method is responsible for
- Assigning the address, if it is allowed to do so.
- Forward the request to assign addresses.
node - - The unassigned node from which this request was received.
connectionRequestPacket - - The request for set up.
public void processNodeAdditionResponse(String node,
- This method processes the Node Addition Response. The information
contained in the nodeAdditionResponse provides indications regarding the
status of the node addition request. In the event that this request
was successfully completed, the node address of the node in question is
nodeAdditionResponse - The response to a node/unit addition
public byte constructNodeAdditionRequest(int levels,
- 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
levels - - Integer array specifying the kind of gateways the node
seeks to be.
from - - Speicification of the to/from relationship for
public static void main(String args)
For comments and suggestions please send
The NaradaBrokering Project