copyright The Portico Project 2008.

org.portico.lrc.handlers
Class REQ_ResignHandler

java.lang.Object
  extended by com.lbf.commons.messaging.AbstractMessageHandler
      extended by org.portico.lrc.handlers.LRCMessageHandler
          extended by org.portico.lrc.handlers.REQ_ResignHandler
All Implemented Interfaces:
com.lbf.commons.messaging.IMessageHandler

public class REQ_ResignHandler
extends LRCMessageHandler

This class handles requests from the federate to resign from the federation.


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
REQ_ResignHandler()
           
 
Method Summary
 void processMessage(com.lbf.commons.messaging.MessageContext context)
          Before the LRC can let the resignation request through to the RTI, it must first validate the request locally.
 
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

REQ_ResignHandler

public REQ_ResignHandler()
Method Detail

processMessage

public void processMessage(com.lbf.commons.messaging.MessageContext context)
                    throws Exception
Before the LRC can let the resignation request through to the RTI, it must first validate the request locally. This method will look at the resign action and in the event that the action is JResignAction.NO_ACTION, it will ensure that the federate does not currently own any attributes. If it does, a JFederateOwnsAttributes exception response will be packaged into the context and the request will not be sent to the RTI.

Assuming the resign action is valid (and the federate is actually joined to a federation) this method will then pass the request on to the RTI for processing. If the RTI responds with a success message, this method will then ask for the LRC to LRC.reinitialize().

Specified by:
processMessage in interface com.lbf.commons.messaging.IMessageHandler
Specified by:
processMessage in class LRCMessageHandler
Throws:
Exception

copyright The Portico Project 2008.