copyright The Portico Project 2008.

org.portico.lrc.handlers
Class REQ_JoinFederationHandler

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

public class REQ_JoinFederationHandler
extends LRCMessageHandler

This handler will process a join federation request, setting up all the relevant components of the LRC if successful. There can only be a single federate connected through any given LRC (and, by extension, any given RTIambassador instance - in the Portico design that is), thus this handler will also check to make sure that a join call can proceed safely and will only allow a single federate per LRC instance.


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_JoinFederationHandler()
           
 
Method Summary
 void processMessage(com.lbf.commons.messaging.MessageContext context)
          Checks that the LRC isn't already connected.
 
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_JoinFederationHandler

public REQ_JoinFederationHandler()
Method Detail

processMessage

public void processMessage(com.lbf.commons.messaging.MessageContext context)
                    throws JRTIinternalError
Checks that the LRC isn't already connected. If it is, an exception is thrown, if not, the request is passed on to the connection. On a successful response message, the state will have the federate/federation names and fed amb set.

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

copyright The Portico Project 2008.