|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The AbleEventQueueManager interface provides methods to manage a thread for asynchronously processing events placed on an event quene and for managing timer events.
If asynchronous events are enabled and the asynchronous thread of
control is started, the bean will awaken whenever an
asynchronous event is placed on the bean's internal event queue
and call AbleEventQueueProcessor.processAbleEvent(com.ibm.able.AbleEvent)
.
If processing timer events is enabled and the asynchronous
thread of control is started, the bean will awaken at periodic
intervals as specified in the "sleep time" variable, and call
AbleEventQueueProcessor.processTimerEvent()
.
Method Summary | |
---|---|
void |
flushAbleEventQueue()
Removes all events from the event queue. |
int |
getAbleEventProcessingEnabled()
Returns the state of asynchronous ABLE event processing. |
int |
getAbleEventQueueSize()
Returns the number of events on the event queue. |
long |
getSleepTime()
Returns the current sleep time setting. |
boolean |
isAbleEventPostingEnabled()
Indicates whether asynchronous ABLE event posting is enabled or disabled. |
boolean |
isAbleEventProcessingEnabled()
Indicates whether asynchronous ABLE event processing is enabled or disabled. |
boolean |
isTimerEventProcessingEnabled()
Indicates if automatic periodic processing is enabled or disabled. |
void |
quitEnabledEventProcessing()
Stop the bean's asynchronous thread of control. |
void |
restartEnabledEventProcessing()
Restart the bean's asynchronous thread of control after the bean has moved from one system to another. |
void |
resumeEnabledEventProcessing()
Resume the bean's suspended asynchronous thread of control. |
void |
setAbleEventProcessingEnabled(int theEnabledFlag)
Sets whether asynchronous ABLE event processing is enabled or disabled. |
void |
setSleepTime(long theSleepTime)
Sets the sleep time interval for the asynchronous timed processing loop. |
void |
setTimerEventProcessingEnabled(boolean theEnabledFlag)
Specify whether automatic periodic processing is enabled or disabled. |
void |
startEnabledEventProcessing()
Start the bean's asynchronous thread of control. |
void |
suspendEnabledEventProcessing()
Temporarily suspend the bean's asynchronous thread of control. |
Method Detail |
public void setSleepTime(long theSleepTime)
theSleepTime
- The number of milliseconds for which the process is to
sleep before it awakes and calls
AbleEventQueueProcessor.processTimerEvent()
.public long getSleepTime()
public void setTimerEventProcessingEnabled(boolean theEnabledFlag)
sleepTime
, and call the
processTimerEvent() method.theEnabledFlag
- Specify true if the bean is to awaken every N
milliseconds and call
AbleEventQueueProcessor.processTimerEvent()
;
specify false if no automatic periodic processing
is to take place while the asynchronous thread of control is
running.public boolean isTimerEventProcessingEnabled()
public void setAbleEventProcessingEnabled(int theEnabledFlag) throws java.lang.IllegalArgumentException
theEnabledFlag
- Specify one of the following values:
Able.ProcessingEnabled_PostingEnabled
Able.ProcessingEnabled_PostingDisabled
Able.ProcessingDisabled_PostingEnabled
Able.ProcessingDisabled_PostingDisabled
java.lang.IllegalArgumentException
- If the parameter is not a valid value.public int getAbleEventProcessingEnabled()
Able.ProcessingEnabled_PostingEnabled
Able.ProcessingEnabled_PostingDisabled
Able.ProcessingDisabled_PostingEnabled
Able.ProcessingDisabled_PostingDisabled
public boolean isAbleEventPostingEnabled()
public boolean isAbleEventProcessingEnabled()
public void flushAbleEventQueue()
Note that unless event Posting is disabled before clearing the event queue, new events may arrive on the queue as soon as it has been cleared!
public int getAbleEventQueueSize()
Note that unless both event Posting and event Processing are disabled, the number may be invalid as soon as it is returned.
public void startEnabledEventProcessing()
In this thread, the bean can perform one, both, or none of these actions, depending on what is enabled:
AbleEventQueueProcessor.processTimerEvent()
.
AbleEventQueueProcessor.processAbleEvent(com.ibm.able.AbleEvent)
.
AbleState.Waiting
setTimerEventProcessingEnabled(boolean)
,
setAbleEventProcessingEnabled(int)
,
quitEnabledEventProcessing()
public void quitEnabledEventProcessing() throws AbleException
AbleState.Unknown
.
Timer event processing and ABLE event processing cease, but if event Posting is still enabled, events may still be placed on the internal event queue by other processes.
AbleException
- If an error occurs.startEnabledEventProcessing()
,
setAbleEventProcessingEnabled(int)
public void suspendEnabledEventProcessing() throws AbleException
AbleState.Unknown
.
Timer event processing and ABLE event processing cease, but if event Posting is still enabled, events may still be placed on the internal event queue by other processes.
AbleException
- If an error occurs.resumeEnabledEventProcessing()
,
setAbleEventProcessingEnabled(int)
public void resumeEnabledEventProcessing() throws AbleException
AbleState.Waiting
.
Timer event processing and ABLE event processing resume if these actions are enabled.
AbleException
- If an error occurs.suspendEnabledEventProcessing()
,
setAbleEventProcessingEnabled(int)
,
setTimerEventProcessingEnabled(boolean)
public void restartEnabledEventProcessing() throws AbleException
AbleState.Waiting
.
Timer event processing and ABLE event processing resume if these actions are enabled.
AbleException
- If an error occurs.setAbleEventProcessingEnabled(int)
,
setTimerEventProcessingEnabled(boolean)
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |