cgl.narada.protocol
Class EventRoutingProtocol
java.lang.Object
java.lang.Thread
cgl.narada.protocol.EventRoutingProtocol
- All Implemented Interfaces:
- ProtocolDebugFlags, Runnable
public class EventRoutingProtocol
- extends Thread
- implements ProtocolDebugFlags
The EventRoutingProtocol is responsible for updating routing information
associated with events. The routing information would vary depending on the
link over which the event was received. Any given node could be connected to
multiple links which have different gateway behavior. The event routing
protocol needs to handle every such case.
| 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.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
EventRoutingProtocol
public EventRoutingProtocol(NodeAddress _nodeAddress,
GatewayInfo gatewayInfo,
ProfilePropagationProtocol ppProtocol,
ClientConnectionHandler clientConnectionHandler,
ProtocolHandler protocolHandler)
- The constructor requires both the nodeAdress which it would use to update
routing information associated with a certain received event, and also
the gatewayInfo which would be used to compute the next most efficient
hop
- Parameters:
_nodeAddress - The node address of the node in question.gatewayInfo - Reference to the connectivity graph hosted at the nodeppProtocol - Reference to the profile propagation protocol which would
provide uswith destinations at different levels.clientConnectionHandler - This is useful for routing events to clients within the
destination lists that are generated.protocolHandler - A handle to the protocol Handler
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
processEventReceived
public void processEventReceived(byte[] nbEventBytes)
- This method is responsible for ensuring the dissemination of events
within the system. This event could have been received from a client or
from a neighboring broker
calculateDestinations
public void calculateDestinations(NBEvent nbEvent,
Destinations toReach,
int computeForLevel)
- This method recursively computes destinations for lower levels. The
recursion stops if the node in question is not a gateway at one of the
levels (starting from highest levels to succesively lower ones)
- Parameters:
nbEvent - The event for which destinations need to be computedtoReach - The destinations that need to be reached
main
public static void main(String[] args)
For comments and suggestions please send
e-mail to
The NaradaBrokering Project