Package net.messagevortex.router
Class SimpleRouterImplementation
java.lang.Object
net.messagevortex.AbstractDaemon
net.messagevortex.router.SimpleRouterImplementation
- All Implemented Interfaces:
BlendingReceiver,Router,RunningDaemon
A simple router implementation providing some basic strategies for building a routing block.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleRouterImplementation(String section) Default constructor to build class from configuration object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBlendingLayer(Blender blendingLayer) Adds a blender layer to the router infrastructure.Get the currently set accounting layer.Get a list of all currently known blender layers.booleangotMessage(VortexMessage message) This Method is called by the Blending layer if a vmessage has been extracted.booleanremoveBlendingLayer(Blender blendingLayer) Removes a previously added blender layer.final AccountantsetAccountant(Accountant accountant) Sets the accounting layer for the router layer.Methods inherited from class net.messagevortex.AbstractDaemon
shutdownDaemon, startDaemon, stopDaemonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.messagevortex.RunningDaemon
shutdownDaemon, startDaemon, stopDaemon
-
Constructor Details
-
SimpleRouterImplementation
Default constructor to build class from configuration object.
- Parameters:
section- configuration section to be used for obtaining the setup parameters
-
-
Method Details
-
addBlendingLayer
Description copied from interface:RouterAdds a blender layer to the router infrastructure.
- Specified by:
addBlendingLayerin interfaceRouter- Parameters:
blendingLayer- the blender layer to be added- Returns:
- true if the blender layer has been accepted (only one blender layer per transport scheme is accepted)
-
removeBlendingLayer
Description copied from interface:RouterRemoves a previously added blender layer.
- Specified by:
removeBlendingLayerin interfaceRouter- Parameters:
blendingLayer- the blender layer to be removed- Returns:
- true if the blender layer was found (and removed)
-
getAllBlendingLayer
Description copied from interface:RouterGet a list of all currently known blender layers.
- Specified by:
getAllBlendingLayerin interfaceRouter- Returns:
- a list of a registered blender layers
-
setAccountant
Description copied from interface:RouterSets the accounting layer for the router layer.
- Specified by:
setAccountantin interfaceRouter- Parameters:
accountant- the accounting layer to be used- Returns:
- the previously set accounting layer
-
getAccountant
Description copied from interface:RouterGet the currently set accounting layer.
- Specified by:
getAccountantin interfaceRouter- Returns:
- the accounting layer or null if none
-
gotMessage
Description copied from interface:BlendingReceiverThis Method is called by the Blending layer if a vmessage has been extracted.
- Specified by:
gotMessagein interfaceBlendingReceiver- Parameters:
message- the vortex message to be processed- Returns:
- true if processing was successful
-