ABLE, Version 1.1b

com.ibm.able
Interface AbleBean

All Known Subinterfaces:
AbleAgent, FipaAccAgent, FipaAgent, FipaAmsAgent, FipaDfAgent
All Known Implementing Classes:
AbleObject

public abstract interface AbleBean
extends java.rmi.Remote, AbleEventListener, AbleEventQueueProcessor

This interface describes the unique behavior required of JavaBeans to be fully integrated into the Able editor and run-time framework.

Version:
$Revision: 1.11 $, $Date: 2000/02/29 20:47:01 $

Method Summary
 void addAbleEventListener(AbleEventListener theListener)
          Add an event listener to this bean.
 void addDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
          Add a destination buffer connection.
 void addPropertyChangeListener(java.beans.PropertyChangeListener theListener)
          Add a property change listener to this bean.
 void addPropertyConnection(AblePropertyConnection thePropertyConnection)
          Add a property connection.
 void addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
          Add a source buffer connection.
 void dataChanged(java.lang.Object theArg)
          Signal that this bean's internal state has changed by sending an event to all registered listeners.
 void flushAbleEventQueue()
           
 java.util.Vector getAbleEventListeners()
          Retrieve a list of all registered Able event listeners.
 int getAbleEventProcessingEnabled()
          Determine whether asynchronous ABLE event processing is enabled or disabled.
 int getAbleEventQueueSize()
          Determine the number of events on the event queue.
 java.lang.String getComment()
          Retrieve the comment associated with this bean.
 java.util.Vector getDestBufferConnections()
          Get the list of all destination (output) buffer connections.
 java.lang.String getFileName()
          Retrieve the persistent store file name.
 java.lang.Object getInputBuffer()
          Retrieve a reference to the input buffer.
 java.lang.Object getInputBuffer(int theIndex)
          Get the value of a single element of the input buffer.
 java.lang.String[] getInputBufferAsStringArray()
          Retrieve the contents of the input buffer as an array of strings.
 java.util.Enumeration getInputBufferContents()
          Retrieve the contents of the input buffer as an enumeration.
 com.ibm.logging.Logger getLogger()
          Retrieve the current logger.
 java.lang.String getName()
          Retrieve the name of this bean.
 java.lang.Object getOutputBuffer()
          Retrieve a reference to the output buffer.
 java.lang.Object getOutputBuffer(int theIndex)
          Get the value of a single element of the output buffer.
 java.lang.String[] getOutputBufferAsStringArray()
          Retrieve the contents of the output buffer as an array of strings.
 java.util.Enumeration getOutputBufferContents()
          Retrieve the contents of the output buffer as an enumeration.
 AbleBeanContainer getParent()
          Retrieve the containing parent of this bean.
 AblePropertyConnectionManager getPropertyConnectionManager()
          Retrieve this bean's property connection manager.
 long getSleepTime()
          Retrieve the current sleep time setting.
 java.util.Vector getSourceBufferConnections()
          Get a list of all source (input) buffer connections.
 int getState()
          Retrieve the current state of this bean.
 boolean hasInputBuffer()
          Check whether this bean has an input buffer.
 boolean hasOutputBuffer()
          Check whether this bean has an output buffer.
 void init()
          Initialize and configure the bean.
 void init(java.lang.Object theArg)
          Initialize and configure the bean, using the specified Object.
 boolean isChanged()
          Check to see if the bean has been changed since the last serialization operation.
 boolean isConnectable()
          Check whether this bean supports buffer connections.
 boolean isDataFlowEnabled()
          Check the data flow processing state of the bean.
 boolean isTimerEventProcessingEnabled()
          Determine whether automatic periodic processing is enabled or disabled.
 void notifyAbleEventListeners(AbleEvent theEvent)
          Notify all registered listeners by sending the specified event.
 void process()
          Perform the main, synchronous, standard processing function performed by this bean.
 void processBufferConnections()
          Process all buffer connections.
 void propertyChange(java.beans.PropertyChangeEvent theEvent)
          Handle property change events from objects with which we have registered as a listener.
 void quitAll()
          Stop the all of the bean's asynchronous threads of control.
 void quitEnabledEventProcessing()
          Stop the bean's asynchronous thread of control.
 void removeAbleEventListener(AbleEventListener theListener)
          Remove an event listener from this bean.
 void removeAllBufferConnections()
          Remove all buffer connections.
 void removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
          Remove a destination buffer connection.
 void removePropertyChangeListener(java.beans.PropertyChangeListener theListener)
          Remove a property change listener from this bean.
 void removePropertyConnection(AblePropertyConnection thePropertyConnection)
          Remove a property connection.
 void removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
          Remove a source buffer connection.
 void reset()
          Reset this bean to its "initialized" state.
 void restartEnabledEventProcessing()
          Restart the bean's asynchronous thread of control after the bean has moved from one system to another.
 AbleBean restoreFromFile()
          Read a serialized bean from the file named previously by the setFileName() method, or from "untitled.ser" if no file name has been set.
 AbleBean restoreFromFile(java.lang.String theFileName)
          Read a serialized bean from the specified file.
 void resumeAll()
          Resume all of the bean's suspended asynchronous threads of control.
 void resumeEnabledEventProcessing()
          Resume the bean's suspended asynchronous thread of control.
 void saveToFile()
          Write a serialized version of this bean to the file named previously by the setFileName() method, or to "untitled.ser" if no file name has been set.
 void saveToFile(java.lang.String theFileName)
          Write a serialized version of this bean to the specified file.
 void setAbleEventProcessingEnabled(int theEnabledFlag)
          Specify whether asynchronous ABLE event processing is enabled or disabled.
 void setChanged(boolean theChangedFlag)
          Set the changed flag.
 void setComment(java.lang.String theComment)
          Set (or change) the comment associated with this bean.
 void setDataFlowEnabled(boolean theDataFlowEnabledState)
          Set the data flow processing state of the bean.
 void setFileName(java.lang.String theFileName)
          Set (or change) the persistent store file name.
 void setInputBuffer(int theIndex, java.lang.Object theObject)
          Set the value of a single element of the input buffer.
 void setInputBuffer(java.lang.Object theInputBuffer)
          Set the input buffer to the specified object.
 void setLogger(com.ibm.logging.Logger theLogger)
          Set a logger into this bean.
 void setName(java.lang.String theName)
          Set (or change) the name of this bean.
 void setOutputBuffer(int theIndex, java.lang.Object theObject)
          Set the value of a single element of the output buffer.
 void setOutputBuffer(java.lang.Object theOutputBuffer)
          Set the output buffer to the specified object.
 void setParent(AbleBeanContainer theAbleBeanContainer)
          Set the containing parent of this bean.
 void setSleepTime(long theSleepTime)
          Set the sleep time for the asynchronous timed processing loop.
 void setState(int theState)
          Set the state of this bean.
 void setTimerEventProcessingEnabled(boolean theEnabledFlag)
          Specify whether automatic periodic processing is enabled or disabled.
 void startEnabledEventProcessing()
          Start the bean's asynchronous thread of control.
 void suspendAll()
          Temporarily suspend all of the bean's asynchronous threads of control.
 void suspendEnabledEventProcessing()
          Temporarily suspend the bean's asynchronous thread of control.
 
Methods inherited from interface com.ibm.able.AbleEventListener
handleAbleEvent
 
Methods inherited from interface com.ibm.able.AbleEventQueueProcessor
processAbleEvent, processNoEventProcessingEnabledSituation, processTimerEvent
 

Method Detail

setName

public void setName(java.lang.String theName)
             throws java.rmi.RemoteException
Set (or change) the name of this bean.
Parameters:
theName - A String containing the new name of this bean. This name replaces the current name.


getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Retrieve the name of this bean.
Returns:
A String containing the current name of this AbleBean object or the empty string if no name has been set. The value is never expected to be null.

setComment

public void setComment(java.lang.String theComment)
                throws java.rmi.RemoteException
Set (or change) the comment associated with this bean.
Parameters:
theComment - A String containing the new comment for this bean. This comment replaces the current comment.


getComment

public java.lang.String getComment()
                            throws java.rmi.RemoteException
Retrieve the comment associated with this bean.
Returns:
A String containing the current comment associated with this bean or the empty string if no comment has been set. The value is never expected to be null.

setChanged

public void setChanged(boolean theChangedFlag)
                throws java.rmi.RemoteException
Set the changed flag.
Parameters:
theChangedFlag - A boolean value specifying whether this bean is to be marked as modified. If true, the bean will be marked as modified; otherwise, the bean will be marked as unmodified;


isChanged

public boolean isChanged()
                  throws java.rmi.RemoteException
Check to see if the bean has been changed since the last serialization operation.
Returns:
true if the bean has been changed since the last save; false otherwise.

dataChanged

public void dataChanged(java.lang.Object theArg)
                 throws java.rmi.RemoteException
Signal that this bean's internal state has changed by sending an event to all registered listeners.
Parameters:
theArg - An object to be used as the argument of an AbleEvent.


setDataFlowEnabled

public void setDataFlowEnabled(boolean theDataFlowEnabledState)
                        throws java.rmi.RemoteException
Set the data flow processing state of the bean.
Parameters:
theDataFlowEnabledState - A boolean indicating whether this bean should process data in buffers. When set to true, this bean will process data in buffers.


isDataFlowEnabled

public boolean isDataFlowEnabled()
                          throws java.rmi.RemoteException
Check the data flow processing state of the bean.
Returns:
true if the bean will process data in buffers; false otherwise.

setFileName

public void setFileName(java.lang.String theFileName)
                 throws java.rmi.RemoteException
Set (or change) the persistent store file name.
Parameters:
theFileName - A String containing the new name of the file to which this bean can be serialized or from which the bean can be de-serialized. This file name replaces the current file name.


getFileName

public java.lang.String getFileName()
                             throws java.rmi.RemoteException
Retrieve the persistent store file name.
Returns:
A String containing the current name of the file to which this bean can be serialized or from which the bean can be de-serialized. If never explicitly set, the returned name is untitled.ser.

setLogger

public void setLogger(com.ibm.logging.Logger theLogger)
               throws java.rmi.RemoteException
Set a logger into this bean.

If a logger is available and is active, base ABLE code will use it to log trace messages.

Parameters:
theLogger - A logger that can be used to trace base ABLE code. The value can be null.


getLogger

public com.ibm.logging.Logger getLogger()
                                 throws java.rmi.RemoteException
Retrieve the current logger.
Specified by:
getLogger in interface AbleEventQueueProcessor
Returns:
the current logger, or null if no logger has been set.

setParent

public void setParent(AbleBeanContainer theAbleBeanContainer)
               throws java.rmi.RemoteException
Set the containing parent of this bean.
Parameters:
theAbleBeanContainer - An ABLE bean container object in which this bean currently resides. Note that a bean may only have one parent at any given time, so this new parent completely replaces the current parent.


getParent

public AbleBeanContainer getParent()
                            throws java.rmi.RemoteException
Retrieve the containing parent of this bean.
Returns:
An AbleBeanContainer object in which this bean resides or null if no parent has been set.

setState

public void setState(int theState)
              throws java.rmi.RemoteException
Set the state of this bean.
Specified by:
setState in interface AbleEventQueueProcessor
Parameters:
theState - An AbleState. value.


getState

public int getState()
             throws java.rmi.RemoteException
Retrieve the current state of this bean.
Returns:
An AbleState. value.

setInputBuffer

public void setInputBuffer(java.lang.Object theInputBuffer)
                    throws java.rmi.RemoteException
Set the input buffer to the specified object.
Parameters:
theInputBuffer - Any object, such as a String[], Vector, Hashtable, and so on, that can act as a buffer of input data. A reference to the object is saved; the object is not cloned. Note that once the input buffer is set, it must not be tampered with while an AbleBean is reading data from it.


getInputBuffer

public java.lang.Object getInputBuffer()
                                throws java.rmi.RemoteException
Retrieve a reference to the input buffer.
Returns:
A reference to the object that is the current input buffer, or null if no input buffer has been set.

setInputBuffer

public void setInputBuffer(int theIndex,
                           java.lang.Object theObject)
                    throws java.rmi.RemoteException
Set the value of a single element of the input buffer.
Parameters:
theIndex - the location within the input buffer that is to be set to the specified value.

theObject - the new value of the element at the specified location.

Throws:
java.rmi.RemoteException - if the input buffer does not support indexing.

getInputBuffer

public java.lang.Object getInputBuffer(int theIndex)
                                throws java.rmi.RemoteException
Get the value of a single element of the input buffer.
Parameters:
theIndex - the location within the input buffer that is to be retrieved.

Throws:
java.rmi.RemoteException - if the input buffer does not support indexing.

hasInputBuffer

public boolean hasInputBuffer()
                       throws java.rmi.RemoteException
Check whether this bean has an input buffer.
Returns:
true if the input buffer has been set; that is, the buffer is not null; otherwise false is returned.

getInputBufferAsStringArray

public java.lang.String[] getInputBufferAsStringArray()
                                               throws java.rmi.RemoteException
Retrieve the contents of the input buffer as an array of strings.
Returns:
An array of string values of the input buffer, or null if no input buffer has been sent.
Throws:
java.rmi.RemoteException - If the input buffer cannot be converted to an array of string values.

getInputBufferContents

public java.util.Enumeration getInputBufferContents()
                                             throws java.rmi.RemoteException
Retrieve the contents of the input buffer as an enumeration.
Returns:
An array of string values of the input buffer, or null if no input buffer has been set.
Throws:
java.rmi.RemoteException - If the input buffer cannot be returned as an enumeration.

setOutputBuffer

public void setOutputBuffer(java.lang.Object theOutputBuffer)
                     throws java.rmi.RemoteException
Set the output buffer to the specified object.
Parameters:
theOutputBuffer - Any object, such as a String[], Vector, Hashtable, and so on, that can act as a buffer of output data. A reference to the object is saved; the object is not cloned. Note that once the output buffer is set, it must not be tampered with while an AbleBean is writing data to it.


getOutputBuffer

public java.lang.Object getOutputBuffer()
                                 throws java.rmi.RemoteException
Retrieve a reference to the output buffer.
Returns:
A reference to the object that is the current output buffer, or null if no output buffer has been set.

setOutputBuffer

public void setOutputBuffer(int theIndex,
                            java.lang.Object theObject)
                     throws java.rmi.RemoteException
Set the value of a single element of the output buffer.
Parameters:
theIndex - the location within the output buffer that is to be set to the specified value.

theObject - the new value of the element at the specified location.

Throws:
java.rmi.RemoteException - if the output buffer does not support indexing.

getOutputBuffer

public java.lang.Object getOutputBuffer(int theIndex)
                                 throws java.rmi.RemoteException
Get the value of a single element of the output buffer.
Parameters:
theIndex - the location within the output buffer that is to be retrieved.

Throws:
java.rmi.RemoteException - if the output buffer does not support indexing.

hasOutputBuffer

public boolean hasOutputBuffer()
                        throws java.rmi.RemoteException
Check whether this bean has an output buffer.
Returns:
true if the output buffer has been set; that is, the buffer is not null; otherwise false is returned.

getOutputBufferAsStringArray

public java.lang.String[] getOutputBufferAsStringArray()
                                                throws java.rmi.RemoteException
Retrieve the contents of the output buffer as an array of strings.
Returns:
An array of string values of the output buffer, or null if no output buffer has been set.
Throws:
java.rmi.RemoteException - If the output buffer cannot be converted to an array of string values.

getOutputBufferContents

public java.util.Enumeration getOutputBufferContents()
                                              throws java.rmi.RemoteException
Retrieve the contents of the output buffer as an enumeration.
Returns:
An array of string values of the output buffer, or null if no output buffer has been set.
Throws:
java.rmi.RemoteException - If the output buffer cannot be returned as an enumeration.

addSourceBufferConnection

public void addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
                               throws java.rmi.RemoteException
Add a source buffer connection.
Parameters:
theAbleBufferConnection - An AbleBufferConnection object


removeSourceBufferConnection

public void removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
                                  throws java.rmi.RemoteException
Remove a source buffer connection.
Parameters:
theAbleBufferConnection - An AbleBufferConnection object.


getSourceBufferConnections

public java.util.Vector getSourceBufferConnections()
                                            throws java.rmi.RemoteException
Get a list of all source (input) buffer connections.
Returns:
A Vector containing all source buffer connections.

addDestBufferConnection

public void addDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
                             throws java.rmi.RemoteException
Add a destination buffer connection.
Parameters:
theAbleBufferConnection - An AbleBufferConnection object.


removeDestBufferConnection

public void removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
                                throws java.rmi.RemoteException
Remove a destination buffer connection.
Parameters:
theAbleBufferConnection - An AbleBufferConnection object.


getDestBufferConnections

public java.util.Vector getDestBufferConnections()
                                          throws java.rmi.RemoteException
Get the list of all destination (output) buffer connections.
Returns:
A Vector containing all destination buffer connections.

isConnectable

public boolean isConnectable()
                      throws java.rmi.RemoteException
Check whether this bean supports buffer connections.
Returns:
true if this bean supports buffer connections; false otherwise.

processBufferConnections

public void processBufferConnections()
                              throws java.rmi.RemoteException
Process all buffer connections.

This method moves data from connected source objects to members in this bean (the inputBuffer)


removeAllBufferConnections

public void removeAllBufferConnections()
                                throws java.rmi.RemoteException
Remove all buffer connections.

addPropertyConnection

public void addPropertyConnection(AblePropertyConnection thePropertyConnection)
                           throws java.rmi.RemoteException
Add a property connection.

removePropertyConnection

public void removePropertyConnection(AblePropertyConnection thePropertyConnection)
                              throws java.rmi.RemoteException
Remove a property connection.

getPropertyConnectionManager

public AblePropertyConnectionManager getPropertyConnectionManager()
                                                           throws java.rmi.RemoteException
Retrieve this bean's property connection manager.
Returns:
The ABLE property connection manager for this bean.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener theListener)
                               throws java.rmi.RemoteException
Add a property change listener to this bean.
Parameters:
theListener - An object interested in this bean.


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener theListener)
                                  throws java.rmi.RemoteException
Remove a property change listener from this bean.
Parameters:
theListener - The object no longer interested in this bean.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent theEvent)
                    throws java.rmi.RemoteException
Handle property change events from objects with which we have registered as a listener.
Parameters:
theEvent - A property change event in which we may be interested.


init

public void init()
          throws java.rmi.RemoteException
Initialize and configure the bean. The bean's state changes from AbleState.Uninitiated to AbleState.Initiated.

init

public void init(java.lang.Object theArg)
          throws java.rmi.RemoteException
Initialize and configure the bean, using the specified Object. The bean's state changes from AbleState.Uninitiated to AbleState.Initiated.
Parameters:
theArg - An Object used to initialize the bean.


reset

public void reset()
           throws java.rmi.RemoteException
Reset this bean to its "initialized" state.

process

public void process()
             throws java.rmi.RemoteException
Perform the main, synchronous, standard processing function performed by this bean. Typically, this function involves taking data from the input buffer, processing the data, creating an output buffer, and placing the processed data into it.

setSleepTime

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

See Also:
AbleEventQueueProcessor.processTimerEvent()

getSleepTime

public long getSleepTime()
                  throws java.rmi.RemoteException
Retrieve the current sleep time setting.
Returns:
the current sleep time, in milliseconds.

setTimerEventProcessingEnabled

public void setTimerEventProcessingEnabled(boolean theEnabledFlag)
                                    throws java.rmi.RemoteException
Specify whether automatic periodic processing is enabled or disabled. When 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 the processTimerEvent() method.

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 processTimerEvent(); specify false if no automatic periodic processing is to take place while the asynchronous thread of control is running.

See Also:
setSleepTime(long), AbleEventQueueProcessor.processTimerEvent(), startEnabledEventProcessing()

isTimerEventProcessingEnabled

public boolean isTimerEventProcessingEnabled()
                                      throws java.rmi.RemoteException
Determine whether automatic periodic processing is enabled or disabled.
Returns:
true if the bean will awaken every N milliseconds and call processTimerEvent(); false otherwise.

setAbleEventProcessingEnabled

public void setAbleEventProcessingEnabled(int theEnabledFlag)
                                   throws java.rmi.RemoteException,
                                          java.lang.IllegalArgumentException
Specify whether asynchronous ABLE event processing is enabled or disabled. When 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 the processAbleEvent() method.

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 events are taken off of the event queue and processed; Other objects may add additional events to the event queue. the queue grows and shrinks as events come in and are processed.
Able.ProcessingEnabled_PostingDisabled
Able events are taken off of the event queue and processed; Other objects may not add new events to the event queue. the queue shrinks until it is empty.
Able.ProcessingDisabled_PostingEnabled
Able events on the event queue remain there, unprocessed; Other objects may add additional events to the event queue; the queue grows.
Able.ProcessingDisabled_PostingDisabled
Able events on the event queue remain there, unprocessed; Other objects may not add new events to the event queue. the queue neither shrinks nor grows.

Throws:
java.lang.IllegalArgumentException - if the parameter is not a valid value.
See Also:
AbleEventQueueProcessor.processAbleEvent(AbleEvent), startEnabledEventProcessing()

getAbleEventProcessingEnabled

public int getAbleEventProcessingEnabled()
                                  throws java.rmi.RemoteException
Determine whether asynchronous ABLE event processing is enabled or disabled.
Returns:
one of the following values:
Able.ProcessingEnabled_PostingEnabled
Able events are taken off of the event queue and processed; Other objects may add additional events to the event queue. the queue grows and shrinks as events come in and are processed.
Able.ProcessingEnabled_PostingDisabled
Able events are taken off of the event queue and processed; Other objects may not add new events to the event queue. the queue shrinks until it is empty.
Able.ProcessingDisabled_PostingEnabled
Able events on the event queue remain there, unprocessed; Other objects may add additional events to the event queue; the queue grows.
Able.ProcessingDisabled_PostingDisabled
Able events on the event queue remain there, unprocessed; Other objects may not add new events to the event queue. the queue neither shrinks nor grows.

flushAbleEventQueue

public void flushAbleEventQueue()
                         throws java.rmi.RemoteException

getAbleEventQueueSize

public int getAbleEventQueueSize()
                          throws java.rmi.RemoteException
Determine 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.

startEnabledEventProcessing

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

In this thread, the bean can perform one, both, or none of these actions, depending on what is enabled (see the related method links):

See Also:
setTimerEventProcessingEnabled(boolean), setAbleEventProcessingEnabled(int), quitEnabledEventProcessing()

quitEnabledEventProcessing

public void quitEnabledEventProcessing()
                                throws java.rmi.RemoteException
Stop the bean's asynchronous thread of control. The bean's state changes to AbleState.Unknown. *Fix* Correct?

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.

See Also:
startEnabledEventProcessing(), setAbleEventProcessingEnabled(int)

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. *Fix* Correct?

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.

See Also:
resumeEnabledEventProcessing(), setAbleEventProcessingEnabled(int)

resumeEnabledEventProcessing

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

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

See Also:
suspendEnabledEventProcessing(), setAbleEventProcessingEnabled(int), setTimerEventProcessingEnabled(boolean)

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 from AbleState.Transient to AbleState.Active.

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

See Also:
setAbleEventProcessingEnabled(int), setTimerEventProcessingEnabled(boolean)

quitAll

public void quitAll()
             throws java.rmi.RemoteException
Stop the all of the bean's asynchronous threads of control.

If the bean is a simple AbleBean, this method just calls its quitEnabledEventProcessing() method; if the bean is an AbleBeanContainer, the bean additionally calls the same method on each contained bean.

See Also:
quitEnabledEventProcessing()

suspendAll

public void suspendAll()
                throws java.rmi.RemoteException
Temporarily suspend all of the bean's asynchronous threads of control.

If the bean is a simple AbleBean, this method just calls its suspendEnabledEventProcessing() method; if the bean is an AbleBeanContainer, the bean additionally calls the same method on each contained bean.

See Also:
suspendEnabledEventProcessing()

resumeAll

public void resumeAll()
               throws java.rmi.RemoteException
Resume all of the bean's suspended asynchronous threads of control.

If the bean is a simple AbleBean, this method just calls its resumeEnabledEventProcessing() method; if the bean is an AbleBeanContainer, the bean additionally calls the same method on each contained bean.

See Also:
resumeEnabledEventProcessing()

addAbleEventListener

public void addAbleEventListener(AbleEventListener theListener)
                          throws java.rmi.RemoteException
Add an event listener to this bean.
Parameters:
theListener - An object interested in this bean.


removeAbleEventListener

public void removeAbleEventListener(AbleEventListener theListener)
                             throws java.rmi.RemoteException
Remove an event listener from this bean.
Parameters:
theListener - The object no longer interested in this bean.


notifyAbleEventListeners

public void notifyAbleEventListeners(AbleEvent theEvent)
                              throws java.rmi.RemoteException
Notify all registered listeners by sending the specified event.
Parameters:
theEvent - The AbleEvent to be broadcast to all listeners.


getAbleEventListeners

public java.util.Vector getAbleEventListeners()
                                       throws java.rmi.RemoteException
Retrieve a list of all registered Able event listeners.
Returns:
A vector of registered AbleEventListener objects.

saveToFile

public void saveToFile()
                throws java.rmi.RemoteException,
                       java.io.IOException
Write a serialized version of this bean to the file named previously by the setFileName() method, or to "untitled.ser" if no file name has been set.
Throws:
java.io.IOException - on any IO exception
See Also:
setFileName(String), getFileName()

saveToFile

public void saveToFile(java.lang.String theFileName)
                throws java.rmi.RemoteException,
                       java.io.IOException
Write a serialized version of this bean to the specified file.
Parameters:
theFileName - The name of the file to write.

Throws:
java.io.IOException - on any IO exception

restoreFromFile

public AbleBean restoreFromFile()
                         throws java.rmi.RemoteException,
                                java.lang.ClassNotFoundException,
                                java.io.IOException
Read a serialized bean from the file named previously by the setFileName() method, or from "untitled.ser" if no file name has been set.
Returns:
The de-serialized bean
Throws:
java.lang.ClassNotFoundException - if any class file is not found
java.io.IOException - on any IO exception
See Also:
setFileName(String), getFileName(), saveToFile(String)

restoreFromFile

public AbleBean restoreFromFile(java.lang.String theFileName)
                         throws java.rmi.RemoteException,
                                java.lang.ClassNotFoundException,
                                java.io.IOException
Read a serialized bean from the specified file.
Parameters:
theFileName - The name of the file containing the serialized AbleBean

Returns:
The de-serialized bean
Throws:
java.lang.ClassNotFoundException - if any class file is not found
java.io.IOException - on any IO exception

ABLE, Version 1.1b

ABLE: Produced by Joe, Don, and Jeff who say, 'Thanks for your support.'