|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAMETAS.util.context.AMETASSequentialContextProcessor
Executes contexts sequentially.
| Field Summary | |
protected AMETASContextManager |
m_ContextManager
Reference to the context manager. |
protected long |
m_nIdleTime
Idle time for the polling interval. |
protected long |
m_nLastMsgTime
Time when the last message was accepted. |
protected long |
m_nTimeoutInterval
Timeout value. |
protected AMETASPlaceUser |
m_pu
Reference to the Place User. |
protected AMETASMessageRetriever |
m_Retriever
Reference to the message retriever. |
| Constructor Summary | |
AMETASSequentialContextProcessor(AMETASPlaceUser pu,
AMETASContextManager cm,
AMETASMessageRetriever ret,
long nDefaultIdle,
long nTimeout)
Constructor. |
|
| Method Summary | |
long |
getIdleTime()
Returns the pause value. |
long |
getTimeout()
Returns the value for the timeout. |
protected void |
messagePushback(MessagePushbackException rex)
Called when a message shall be pushed back during execution of startProcessing. |
protected void |
messageRejected(MessageRejectedException rex)
Called when a message is rejected during execution of startProcessing. |
void |
resetTimeout()
Touches the timeout checker. |
void |
setIdleTime(long nIdle)
Defines the value for the pause. |
void |
setTimeout(long nTimeout)
Sets the value for the timeout. |
void |
startProcessing()
Executes contexts in a default way. |
void |
startProcessing(boolean bCheckNewContext,
java.lang.Object[] aParam)
Executes contexts in a default way. |
void |
startProcessing(java.lang.Object[] aParam)
Executes contexts in a default way. |
boolean |
timeoutOccured()
Determines whether a timeout has occured. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected long m_nIdleTime
protected long m_nTimeoutInterval
protected long m_nLastMsgTime
protected AMETASContextManager m_ContextManager
protected AMETASMessageRetriever m_Retriever
protected AMETASPlaceUser m_pu
| Constructor Detail |
public AMETASSequentialContextProcessor(AMETASPlaceUser pu,
AMETASContextManager cm,
AMETASMessageRetriever ret,
long nDefaultIdle,
long nTimeout)
pu - Reference to the Place User.cm - Context manager.ret - Object which retrieves the messages.nDefaultIdle - Default time in milliseconds for idling the driver.nTimeout - Timeout value.| Method Detail |
public long getIdleTime()
public void setIdleTime(long nIdle)
nIdle - Pause value in milliseconds.public long getTimeout()
public void setTimeout(long nTimeout)
nTimeout - Timeout value in milliseconds.public void resetTimeout()
public boolean timeoutOccured()
public void startProcessing()
throws ContextException,
TimeoutException
ContextException - if there has been a problem with a context.
TimeoutException - if there was a timeout; this may happen when a reply
did not arrive in time or when the first request never came.
public void startProcessing(java.lang.Object[] aParam)
throws ContextException,
TimeoutException
aParam - Initialization parameters. May for example contain a reference to the
service object.
ContextException - if there has been a problem with a context.
TimeoutException - if there was a timeout; this may happen when a reply
did not arrive in time or when the first request never came.
public void startProcessing(boolean bCheckNewContext,
java.lang.Object[] aParam)
throws ContextException,
TimeoutException
bCheckNewContext - if true, the processor will repeatedly check whether a
new (unstable) context shall be created. This also depends on whether the
context manager has got a reference to a context controller.aParam - Initialization parameters. May for example contain a reference to the
service object.
ContextException - if there has been a problem with a context.
TimeoutException - if there was a timeout; this may happen when a reply
did not arrive in time or when the first request never came.protected void messageRejected(MessageRejectedException rex)
startProcessing. This implementation
merely output a notice to the log and returns. If a specific behavior
is desired, this method should be overwritten.
rex - Exception which was thrown by the context, containing the
reason of rejection.protected void messagePushback(MessagePushbackException rex)
startProcessing. This implementation
merely output a notice to the log, makes the retriever push back the
message, and returns. If a specific behavior
is desired, this method should be overwritten.
rex - Exception which was thrown by the context, containing the
reason of pushback.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||