ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able
Interface AbleEventQueueRemoteManager

All Superinterfaces:
java.rmi.Remote, java.io.Serializable
All Known Subinterfaces:
AblePlatformAgent, AbleRemoteAgent, AbleRemoteBean, AbleRemoteDataSink, AbleRemoteDataSource, AutotuneAgentIf, JasKnnDistributedAgentIF, JasNaiveBayesDistributedAgentIF

public interface AbleEventQueueRemoteManager
extends java.rmi.Remote, java.io.Serializable

The AbleEventQueueRemoteManager interface provides methods to remotely 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()
          Remove 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 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

setSleepTime

public void setSleepTime(long theSleepTime)
                  throws java.rmi.RemoteException
Sets the sleep time interval for the asynchronous timed processing loop.
Parameters:
theSleepTime - The number of milliseconds for which the process is to sleep before it awakes and calls AbleEventQueueProcessor.processTimerEvent().
Throws:
java.rmi.RemoteException - If an error occurs.

getSleepTime

public long getSleepTime()
                  throws java.rmi.RemoteException
Returns the current sleep time setting.
Returns:
The current sleep time setting in milliseconds.
Throws:
java.rmi.RemoteException - If an error occurs.

setTimerEventProcessingEnabled

public void setTimerEventProcessingEnabled(boolean theEnabledFlag)
                                    throws java.rmi.RemoteException
Specify whether automatic periodic processing is enabled or disabled. This method can be used before the asynchronous thread of control is started in order to set the bean's initial behavior; the method can also be used while the thread is running to start and stop the behavior.
Parameters:
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.
Throws:
java.rmi.RemoteException - If an error occurs.

isTimerEventProcessingEnabled

public boolean isTimerEventProcessingEnabled()
                                      throws java.rmi.RemoteException
Indicates if automatic periodic processing is enabled or disabled.
Returns:
true if the bean will awaken every N milliseconds; false otherwise.
Throws:
java.rmi.RemoteException - If an error occurs.

setAbleEventProcessingEnabled

public void setAbleEventProcessingEnabled(int theEnabledFlag)
                                   throws java.rmi.RemoteException
Sets whether asynchronous ABLE event processing is enabled or disabled. This method can be used before the asynchronous thread of control is started in order to set the bean's initial behavior; the method can also be used while the thread is running to start and stop the behavior.
Parameters:
theEnabledFlag - Specify one of the following values:
  • Able.ProcessingEnabled_PostingEnabled
  • Able.ProcessingEnabled_PostingDisabled
  • Able.ProcessingDisabled_PostingEnabled
  • Able.ProcessingDisabled_PostingDisabled

    Throws:
    java.rmi.RemoteException - If an error occurs or if the parameter is not a valid value.

  • getAbleEventProcessingEnabled

    public int getAbleEventProcessingEnabled()
                                      throws java.rmi.RemoteException
    Returns the state of asynchronous ABLE event processing.
    Returns:
    The event processing state, one of the following values:
  • Able.ProcessingEnabled_PostingEnabled
  • Able.ProcessingEnabled_PostingDisabled
  • Able.ProcessingDisabled_PostingEnabled
  • Able.ProcessingDisabled_PostingDisabled
    Throws:
    java.rmi.RemoteException - If an error occurs.

  • flushAbleEventQueue

    public void flushAbleEventQueue()
                             throws java.rmi.RemoteException
    Remove all events from the event queue.

    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!

    Throws:
    java.rmi.RemoteException - If an error occurs.

    getAbleEventQueueSize

    public int getAbleEventQueueSize()
                              throws java.rmi.RemoteException
    Returns the number of events on the event queue.

    Note that unless both event Posting and event Processing are disabled, the number may be invalid as soon as it is returned.

    Returns:
    The number of events on the queue.
    Throws:
    java.rmi.RemoteException - If an error occurs.

    startEnabledEventProcessing

    public void startEnabledEventProcessing()
                                     throws java.rmi.RemoteException
    Start the bean's asynchronous thread of control. The bean's state changes to AbleState.Waiting.

    In this thread, the bean can perform one, both, or none of these actions, depending on what is enabled:

    Throws:
    java.rmi.RemoteException - If an error occurs.

    quitEnabledEventProcessing

    public void quitEnabledEventProcessing()
                                    throws java.rmi.RemoteException
    Stop the bean's asynchronous thread of control. The bean's state changes to 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.

    Throws:
    java.rmi.RemoteException - If an error occurs.

    suspendEnabledEventProcessing

    public void suspendEnabledEventProcessing()
                                       throws java.rmi.RemoteException
    Temporarily suspend the bean's asynchronous thread of control. The bean's state changes to 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.

    Throws:
    java.rmi.RemoteException - If an error occurs.

    resumeEnabledEventProcessing

    public void resumeEnabledEventProcessing()
                                      throws java.rmi.RemoteException
    Resume the bean's suspended asynchronous thread of control. The bean's state changes to AbleState.Waiting.

    Timer event processing and ABLE event processing resume if these actions are enabled.

    Throws:
    java.rmi.RemoteException - If an error occurs.

    restartEnabledEventProcessing

    public void restartEnabledEventProcessing()
                                       throws java.rmi.RemoteException
    Restart the bean's asynchronous thread of control after the bean has moved from one system to another. The bean's state changes to AbleState.Waiting.

    Timer event processing and ABLE event processing resume if these actions are enabled.

    Throws:
    java.rmi.RemoteException - If an error occurs.

    ABLE 2.0.0 07/02/2003 10:25:01

    (C) Copyright IBM Corporation 1999, 2003