copyright The Portico Project 2008.

org.portico.lrc.handlers
Class CLB_Terminator

java.lang.Object
  extended by com.lbf.commons.messaging.AbstractMessageHandler
      extended by org.portico.lrc.handlers.LRCMessageHandler
          extended by 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.


Field Summary
 
Fields inherited from class org.portico.lrc.handlers.LRCMessageHandler
interests, logger, lrc, regions, repository, state
 
Fields inherited from class com.lbf.commons.messaging.AbstractMessageHandler
augmentable, name
 
Constructor Summary
CLB_Terminator()
           
 
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 org.portico.lrc.handlers.LRCMessageHandler
error, error, getConnection, getFOM, initialize, sendMessage, success, success, success
 
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
 

Constructor Detail

CLB_Terminator

public CLB_Terminator()
Method Detail

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()

copyright The Portico Project 2008.