copyright The Portico Project 2008.

org.portico.impl.hla13.handlers
Class CLB_Java1CallbackHandler

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

public class CLB_Java1CallbackHandler
extends LRCMessageHandler

This class is pretty much a clone of CLB_CallbackHandler except for the hla.rti13.java1 interface rather than hla.rti. See that class for more information.


Field Summary
private  HashMap<String,com.lbf.commons.delegate.Delegate> delegates
           
private  ImplJava1Helper helper
           
private  org.apache.log4j.Logger logger
           
 
Fields inherited from class org.portico.lrc.handlers.LRCMessageHandler
interests, lrc, regions, repository, state
 
Fields inherited from class com.lbf.commons.messaging.AbstractMessageHandler
augmentable, name
 
Constructor Summary
CLB_Java1CallbackHandler()
           
 
Method Summary
 void constrainedEnabled(com.lbf.commons.messaging.RequestMessage request)
           
private  String decodeString(byte[] tag)
           
 void discoverObject(com.lbf.commons.messaging.RequestMessage request)
           
 void federationSynchronized(com.lbf.commons.messaging.RequestMessage request)
           
 void initialize(com.lbf.commons.utils.Bag<String,?> properties)
          This method will attempt to extract from the given properties the instance of the ImplJava1Helper class that provides its link to the federate to which the various callbacks should be delivered.
 void processMessage(com.lbf.commons.messaging.MessageContext context)
          This method attempts to locate the appropriate Delegate for the incoming request (based off the request messages identifier) and then invoke the delegate passing the message context as the parameter.
 void provideUpdate(com.lbf.commons.messaging.RequestMessage request)
           
 void receiveInteraction(com.lbf.commons.messaging.RequestMessage request)
           
 void reflectAttributes(com.lbf.commons.messaging.RequestMessage request)
           
 void regulationEnabled(com.lbf.commons.messaging.RequestMessage request)
           
 void removeObject(com.lbf.commons.messaging.RequestMessage request)
           
 void syncPointAnnounced(com.lbf.commons.messaging.RequestMessage request)
           
 void syncPointRegResult(com.lbf.commons.messaging.RequestMessage request)
           
 void timeAdvanceGranted(com.lbf.commons.messaging.RequestMessage request)
           
 
Methods inherited from class org.portico.lrc.handlers.LRCMessageHandler
error, error, getConnection, getFOM, 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
 

Field Detail

delegates

private HashMap<String,com.lbf.commons.delegate.Delegate> delegates

helper

private ImplJava1Helper helper

logger

private org.apache.log4j.Logger logger
Constructor Detail

CLB_Java1CallbackHandler

public CLB_Java1CallbackHandler()
Method Detail

initialize

public void initialize(com.lbf.commons.utils.Bag<String,?> properties)
                throws com.lbf.commons.config.ConfigurationException
This method will attempt to extract from the given properties the instance of the ImplJava1Helper class that provides its link to the federate to which the various callbacks should be delivered. If that helper cannot be found, an exception will be thrown.

The other main function of this class is to extract from the properties the configuration information that is used to identify which messages should be processed by which methods of this class. See the class level javadoc for more information.

Specified by:
initialize in interface com.lbf.commons.messaging.IMessageHandler
Overrides:
initialize in class LRCMessageHandler
Throws:
com.lbf.commons.config.ConfigurationException

processMessage

public void processMessage(com.lbf.commons.messaging.MessageContext context)
                    throws JRTIinternalError
This method attempts to locate the appropriate Delegate for the incoming request (based off the request messages identifier) and then invoke the delegate passing the message context as the parameter. If the delegate cannot be found, or an exception is thrown while invoking it, an exception is thrown.

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

timeAdvanceGranted

public void timeAdvanceGranted(com.lbf.commons.messaging.RequestMessage request)
                        throws Exception
Throws:
Exception

constrainedEnabled

public void constrainedEnabled(com.lbf.commons.messaging.RequestMessage request)
                        throws Exception
Throws:
Exception

regulationEnabled

public void regulationEnabled(com.lbf.commons.messaging.RequestMessage request)
                       throws Exception
Throws:
Exception

syncPointRegResult

public void syncPointRegResult(com.lbf.commons.messaging.RequestMessage request)
                        throws Exception
Throws:
Exception

syncPointAnnounced

public void syncPointAnnounced(com.lbf.commons.messaging.RequestMessage request)
                        throws Exception
Throws:
Exception

federationSynchronized

public void federationSynchronized(com.lbf.commons.messaging.RequestMessage request)
                            throws Exception
Throws:
Exception

discoverObject

public void discoverObject(com.lbf.commons.messaging.RequestMessage request)
                    throws Exception
Throws:
Exception

removeObject

public void removeObject(com.lbf.commons.messaging.RequestMessage request)
                  throws Exception
Throws:
Exception

receiveInteraction

public void receiveInteraction(com.lbf.commons.messaging.RequestMessage request)
                        throws Exception
Throws:
Exception

reflectAttributes

public void reflectAttributes(com.lbf.commons.messaging.RequestMessage request)
                       throws Exception
Throws:
Exception

provideUpdate

public void provideUpdate(com.lbf.commons.messaging.RequestMessage request)
                   throws Exception
Throws:
Exception

decodeString

private String decodeString(byte[] tag)

copyright The Portico Project 2008.