|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lbf.commons.messaging.AbstractMessageHandler
org.portico.lrc.handlers.LRCMessageHandler
org.portico.lrc.handlers.REQ_SubscribeInteractionHandler
public class REQ_SubscribeInteractionHandler
This handler manages interaction subscribe/unsubscribe requests. It will make all the appropriate checks before sending the request on to the RTI, and it will store the relevant information once it has been returned from the RTI.
Before *ANY* request is processed, theprocessMessage()
method will check to make sure the federate is an execution member and that a save or restore
is not currently in progress.
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_SubscribeInteractionHandler()
|
Method Summary | |
---|---|
void |
processMessage(com.lbf.commons.messaging.MessageContext context)
Processes an incoming message and depending on the type, delegates it to the appropriate private handling method. |
private void |
subscribe(com.lbf.commons.messaging.MessageContext context)
Attempt to inform the RTI that the federate wishes to subscribe to the given interaction class. |
private void |
unsubscribe(com.lbf.commons.messaging.MessageContext context)
Attempt to inform the RTI that the federate wishes to no longer subscribe the given interaction class. |
private ICMetadata |
validate(int classHandle)
This method will verify that the interaction class exists in the FOM. |
private RegionInstance |
validateDDM(ICMetadata metadata,
int regionToken)
This method will validate the DDM portion of a request. |
private void |
validateSubscribed(int classHandle)
This method validates that the given interaction class is subscribed by this federate |
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 |
---|
public REQ_SubscribeInteractionHandler()
Method Detail |
---|
public void processMessage(com.lbf.commons.messaging.MessageContext context) throws Exception
processMessage
in interface com.lbf.commons.messaging.IMessageHandler
processMessage
in class LRCMessageHandler
Exception
private void subscribe(com.lbf.commons.messaging.MessageContext context) throws Exception
LRCInterestManager
.
Exception
private void unsubscribe(com.lbf.commons.messaging.MessageContext context) throws Exception
LRCInterestManager
.
Exception
private ICMetadata validate(int classHandle) throws JInteractionClassNotDefined, JRTIinternalError
ICMetadata
instance associated with it.
ICMetadata
associated with the class handle
JInteractionClassNotDefined
- If the classHandle doesn't represent a class in the FOM
JRTIinternalError
- If there is a problem locating the FOMprivate void validateSubscribed(int classHandle) throws JInteractionClassNotSubscribed
JObjectClassNotPublished
- If the object class is not currently published
JInteractionClassNotSubscribed
private RegionInstance validateDDM(ICMetadata metadata, int regionToken) throws JRegionNotKnown, JInvalidRegionContext
RegionInstance
identified by the token.
metadata
- The FOM information about the interactionregionToken
- The token identifiying the region
JRegionNotKnown
JInvalidRegionContext
|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |