|
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_TimeAdvanceHandler
public class REQ_TimeAdvanceHandler
This handler currently processes all time related requests. If hands processing for different requests off to private worker methods. See the javadoc for each method for more information.
| 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_TimeAdvanceHandler()
|
|
| Method Summary | |
|---|---|
private void |
disableTimeConstrained(com.lbf.commons.messaging.MessageContext context)
Runs some sanity checks that include checking for invalid state (can't disable time constrained if it isn't enabled). |
private void |
disableTimeRegulation(com.lbf.commons.messaging.MessageContext context)
Does state checking and sends the message to the RTI. |
private void |
enableTimeConstrained(com.lbf.commons.messaging.MessageContext context)
Runs some sanity checks that include checking for invalid state (can't enable time constrained if it is already enabled etc...). |
private void |
enableTimeRegulation(com.lbf.commons.messaging.MessageContext context)
Does some status checking and then passes the request to the RTI. |
private void |
modifyLookahead(com.lbf.commons.messaging.MessageContext context)
Sanity checks the requested new lookahead (ensures the federate is regulating etc...). |
private void |
nextEventRequest(com.lbf.commons.messaging.MessageContext context)
Checks what the timestamp of the next available TSO message is (inside the LRCQueue). |
void |
processMessage(com.lbf.commons.messaging.MessageContext context)
Depending on the type of the request (as determined by instanceof) it will hand
it off to the appropriate private worker method. |
private void |
timeAdvanceRequest(com.lbf.commons.messaging.MessageContext context)
Runs all the necessary status checks. |
| 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_TimeAdvanceHandler()
| Method Detail |
|---|
public void processMessage(com.lbf.commons.messaging.MessageContext context)
throws Exception
instanceof) it will hand
it off to the appropriate private worker method. See the javadoc for those methods for more
information.
processMessage in interface com.lbf.commons.messaging.IMessageHandlerprocessMessage in class LRCMessageHandlerException
private void enableTimeConstrained(com.lbf.commons.messaging.MessageContext context)
throws Exception
Exception
private void disableTimeConstrained(com.lbf.commons.messaging.MessageContext context)
throws Exception
Exception
private void enableTimeRegulation(com.lbf.commons.messaging.MessageContext context)
throws Exception
LRCState will be set to
LRCState.Status.PENDING.
Exception
private void disableTimeRegulation(com.lbf.commons.messaging.MessageContext context)
throws Exception
LRCState is set to LRCState.Status.OFF
Exception
private void timeAdvanceRequest(com.lbf.commons.messaging.MessageContext context)
throws Exception
advancing status of the LRCState is set to
true and the requestedTime property
is set to the given time.
Exception
private void nextEventRequest(com.lbf.commons.messaging.MessageContext context)
throws Exception
LRCQueue).
If there is a message, it's timestamp is used at the time to request an advance to. If there
is no message, the time given with the request is used. Following this, a new
RTI_TimeAdvanceRequest is generated (with the time to advance to) and passed to the
timeAdvanceRequest(MessageContext) method.
Exception
private void modifyLookahead(com.lbf.commons.messaging.MessageContext context)
throws Exception
Exception
|
copyright The Portico Project 2008. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||