org.portico.lrc.handlers
Class REQ_SyncPointHandler
java.lang.Object
com.lbf.commons.messaging.AbstractMessageHandler
org.portico.lrc.handlers.LRCMessageHandler
org.portico.lrc.handlers.REQ_SyncPointHandler
- All Implemented Interfaces:
- com.lbf.commons.messaging.IMessageHandler
public class REQ_SyncPointHandler
- extends LRCMessageHandler
Handler to process all sync point related requests. If hands processing for different requests
off to private worker methods. See the javadoc for each method for more information.
Fields inherited from class com.lbf.commons.messaging.AbstractMessageHandler |
augmentable, name |
Method Summary |
void |
processMessage(com.lbf.commons.messaging.MessageContext context)
Depending on the type of the request (as determined by instanceof ) it will hand
it off to the appropriate private worker method. |
private void |
registerSynchronizationPoint(com.lbf.commons.messaging.MessageContext context)
This method will validate that the request to register the sync point is valid before sending
it on to the RTI for further processing. |
private void |
synchronizationPointAchieved(com.lbf.commons.messaging.MessageContext context)
This method handles requests from a federate to signal to the federation that it has
achieved a sync point. |
Methods inherited from class com.lbf.commons.messaging.AbstractMessageHandler |
getName, isAugmentable, setAugmentable, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REQ_SyncPointHandler
public REQ_SyncPointHandler()
processMessage
public void processMessage(com.lbf.commons.messaging.MessageContext context)
throws Exception
- Depending on the type of the request (as determined by
instanceof
) it will hand
it off to the appropriate private worker method. See the javadoc for those methods for more
information.
- Specified by:
processMessage
in interface com.lbf.commons.messaging.IMessageHandler
- Specified by:
processMessage
in class LRCMessageHandler
- Throws:
Exception
registerSynchronizationPoint
private void registerSynchronizationPoint(com.lbf.commons.messaging.MessageContext context)
throws Exception
- This method will validate that the request to register the sync point is valid before sending
it on to the RTI for further processing. It will ensure that the federate is in a state where
it can issue the request (for example, not in the middle of a save) and it will ensure that
the requested label actually contains some contents (isn't null or an empty string). It will
then hand the request off to the RTI. On response, it will queue a callback to inform the
federate of the result of the request.
- Throws:
Exception
synchronizationPointAchieved
private void synchronizationPointAchieved(com.lbf.commons.messaging.MessageContext context)
throws Exception
- This method handles requests from a federate to signal to the federation that it has
achieved a sync point. The method will check that the federate is in a valid state to issue
the request, and that the label corresponds to a sync point that has previously been
announced. It will then note locally that the federate has achieved the sync point (in the
LRCState) before sending the request to the RTI.
- Throws:
Exception