copyright The Portico Project 2008.

org.portico.lrc.handlers
Class REQ_AssociateRegionHandler

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

public class REQ_AssociateRegionHandler
extends LRCMessageHandler


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_AssociateRegionHandler()
           
 
Method Summary
private  void associate(RTI_AssociateForUpdates request, com.lbf.commons.messaging.MessageContext context)
          This method will associate a set of attributes of a particular object instance with a region so that when an update is sent, federates that use DDM and are not subscribed with an overlapping region won't receive the update.
 void processMessage(com.lbf.commons.messaging.MessageContext context)
           
private  void unassociate(RTI_UnassociateForUpdates request, com.lbf.commons.messaging.MessageContext context)
          This method is the reverse of associate(RTI_AssociateForUpdates, MessageContext).
 
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_AssociateRegionHandler

public REQ_AssociateRegionHandler()
Method Detail

processMessage

public void processMessage(com.lbf.commons.messaging.MessageContext context)
                    throws Exception
Specified by:
processMessage in interface com.lbf.commons.messaging.IMessageHandler
Specified by:
processMessage in class LRCMessageHandler
Throws:
Exception

associate

private void associate(RTI_AssociateForUpdates request,
                       com.lbf.commons.messaging.MessageContext context)
                throws Exception
This method will associate a set of attributes of a particular object instance with a region so that when an update is sent, federates that use DDM and are not subscribed with an overlapping region won't receive the update.

This method will do all the normal validation checks (make sure the region exists, that it can be associated with the provided set of attributes, that the object and attributes exist themselves) and if there is a problem, an approrpriate exception will be thrown.

Throws:
Exception

unassociate

private void unassociate(RTI_UnassociateForUpdates request,
                         com.lbf.commons.messaging.MessageContext context)
                  throws Exception
This method is the reverse of associate(RTI_AssociateForUpdates, MessageContext). After this call, any attribute that was associated with the identified region for the particular object class will no longer be associated with that region. Subsequent updates to those attributes will not be subject to DDM restrictions.

Throws:
Exception

copyright The Portico Project 2008.