cgl.narada.protocol
Class ConnectionPropagation

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

public class ConnectionPropagation
extends Object
implements ProtocolDebugFlags

ConnectionPropogation
This class is responsible for the propagation of a connection within only the relevant units of the subsystem. Thus a level-0 gateway that has been added, needs to have its information disseminated only within the confines of the cluster that it belongs to. In general a level l gateway should be disseminated only within the confines of (l+1) unit that it belongs to. Connections thus received are used to update the connectivity graph, and result in the updating of the routing cache. This class performs this function for connections that are added as a result of the node addition protocol or gateways established using the gateway propagation 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
ConnectionPropagation(GatewayInfo gatewayInfo, ProtocolHandler protocolHandler)
          The connection Propagation constructor
 
Method Summary
static void main(String[] args)
           
 void processConnectionBuffer(byte[] connectionsBufferStream)
          When a new node/unit is added to the existing system, the newly added unit needs to recreate the view of the connectivitives that exist throughout the system.
 void processConnectionPropagation(byte[] connectionPropBuffer)
          When a node/unit is added to the system.
 void propagateConnectionBufferToHop(Gateway hop)
          In response to a sub system (LEVEL level) being added to an existing system, the node belonging to the system needs to exachange data regarding gateways at level onwards in the newly merged system.
 void propagateConnectionInformation(Connection connection, boolean connectionAdded)
          This method is invoked by the node which has received a node set up request, after the setup is complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPropagation

public ConnectionPropagation(GatewayInfo gatewayInfo,
                             ProtocolHandler protocolHandler)
The connection Propagation constructor

Parameters:
gatewayInfo - The connectivity graph
protocolHandler - The protocol handler for the server node.
Method Detail

processConnectionPropagation

public void processConnectionPropagation(byte[] connectionPropBuffer)
When a node/unit is added to the system. The connection that has been added is propogated within the relevant context, as defined by the rules pertaining to connection dissemination. This method is responsible for -
  • Retrieving this connection information, and adding it to the connectivity graph.
  • Depending on the kind of gateway over which this hop was received, we need to recreate destinations at differing levels. Thus if we receive information over a level-1 gateway we need to calculate destinations at level-0.
  • Route this connection information to destinations where it hasn't yet been routed to.

    Parameters:
    connectionPropBuffer - This is the byte stream that is received over a link

  • propagateConnectionInformation

    public void propagateConnectionInformation(Connection connection,
                                               boolean connectionAdded)
    This method is invoked by the node which has received a node set up request, after the setup is complete. This method computes the destinations that need to receive this information. Besides this the method also updates the routing information contained in the protocol packet to reflect the destinations which have already received this connection viz. the nodes comprising the gateway.

    Parameters:
    connection - The connection that has been established

    processConnectionBuffer

    public void processConnectionBuffer(byte[] connectionsBufferStream)
    When a new node/unit is added to the existing system, the newly added unit needs to recreate the view of the connectivitives that exist throughout the system. Depending on the kind of gateway this serialized stream, of the graph, is sent over the information sent varies. This method is responsible for processing such a buffer that has been sent over a link.

    Parameters:
    connectionsBufferStream - The serialized stream of relevant connections that has been received over a gateway.

    propagateConnectionBufferToHop

    public void propagateConnectionBufferToHop(Gateway hop)
    In response to a sub system (LEVEL level) being added to an existing system, the node belonging to the system needs to exachange data regarding gateways at level onwards in the newly merged system. This method provides a view of the connectivity graph that would be valid at the other node. This provides a serialized list of the connections that need to be sent over a certain level and recreates a view of the connectivitives that exist throughout the system. Depending on the kind of gateway this serialized stream, of the graph, is sent over the information sent varies. This method is responsible for creating such an information exchange buffer and sending it over the link.

    Parameters:
    hop - The gateway over which the serialized stream of relevant connections needs to be sent over.

    main

    public static void main(String[] args)


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