org.portico.lrc.handlers
Class CLB_Terminator
java.lang.Object
com.lbf.commons.messaging.AbstractMessageHandler
org.portico.lrc.handlers.LRCMessageHandler
org.portico.lrc.handlers.CLB_Terminator
- All Implemented Interfaces:
- com.lbf.commons.messaging.IMessageHandler
public class CLB_Terminator
- extends LRCMessageHandler
This handler processes messages of type EXT_TerminateLRC
.
This message indicates a remote termination of the federates involvement in the federation.
Thus, it will make all appropriate changes to the LRC as if it had resigned itself.
As a result of this termination, federates should receive a "not joined" exception when attempt
to call any method on the RTIambassador.
*** NOTE *** There is a potential race condition here as a federate initiated request
could be halfway through processing in another thread. Given that the process of these messages
are going to be out-of-the-norm style events, I've decided not to impose on the request sink
the burden of synchronization simply to keep everything happen in the unlikely event that
extension messages will ever be processed. Even when they are, it is reasonable to expect that
something like the remote termination of a federate might prompt exceptions on the client side.
Fields inherited from class com.lbf.commons.messaging.AbstractMessageHandler |
augmentable, name |
Method Summary |
void |
processMessage(com.lbf.commons.messaging.MessageContext context)
This is a notification that the federate has been terminated by force. |
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 |
CLB_Terminator
public CLB_Terminator()
processMessage
public void processMessage(com.lbf.commons.messaging.MessageContext context)
throws Exception
- This is a notification that the federate has been terminated by force. It will treat the
callback much like a resignation and will cause the
LRC
to be
reinitialized.
- Specified by:
processMessage
in interface com.lbf.commons.messaging.IMessageHandler
- Specified by:
processMessage
in class LRCMessageHandler
- Throws:
Exception
- See Also:
LRC.reinitialize()