|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes the unique behavior required of JavaBeans to be fully integrated into the Able editor and run-time framework.
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 |
public void setName(java.lang.String theName) throws java.rmi.RemoteException
theName
- A String containing the new name of this bean. This
name replaces the current name.
public java.lang.String getName() throws java.rmi.RemoteException
public void setComment(java.lang.String theComment) throws java.rmi.RemoteException
theComment
- A String containing the new comment for this bean.
This comment replaces the current comment.
public java.lang.String getComment() throws java.rmi.RemoteException
public void setChanged(boolean theChangedFlag) throws java.rmi.RemoteException
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;
public boolean isChanged() throws java.rmi.RemoteException
public void dataChanged(java.lang.Object theArg) throws java.rmi.RemoteException
theArg
- An object to be used as the argument of an AbleEvent.
public void setDataFlowEnabled(boolean theDataFlowEnabledState) throws java.rmi.RemoteException
theDataFlowEnabledState
- A boolean indicating whether this bean should process
data in buffers. When set to true, this bean
will process data in buffers.
public boolean isDataFlowEnabled() throws java.rmi.RemoteException
public void setFileName(java.lang.String theFileName) throws java.rmi.RemoteException
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.
public java.lang.String getFileName() throws java.rmi.RemoteException
public void setLogger(com.ibm.logging.Logger theLogger) throws java.rmi.RemoteException
If a logger is available and is active, base ABLE code will use it to log trace messages.
theLogger
- A logger that can be used to trace base ABLE code. The
value can be null.
public com.ibm.logging.Logger getLogger() throws java.rmi.RemoteException
public void setParent(AbleBeanContainer theAbleBeanContainer) throws java.rmi.RemoteException
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.
public AbleBeanContainer getParent() throws java.rmi.RemoteException
public void setState(int theState) throws java.rmi.RemoteException
theState
- An AbleState.public int getState() throws java.rmi.RemoteException
public void setInputBuffer(java.lang.Object theInputBuffer) throws java.rmi.RemoteException
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.
public java.lang.Object getInputBuffer() throws java.rmi.RemoteException
public void setInputBuffer(int theIndex, java.lang.Object theObject) throws java.rmi.RemoteException
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.
public java.lang.Object getInputBuffer(int theIndex) throws java.rmi.RemoteException
theIndex
- the location within the input buffer that is to be
retrieved.
public boolean hasInputBuffer() throws java.rmi.RemoteException
public java.lang.String[] getInputBufferAsStringArray() throws java.rmi.RemoteException
public java.util.Enumeration getInputBufferContents() throws java.rmi.RemoteException
public void setOutputBuffer(java.lang.Object theOutputBuffer) throws java.rmi.RemoteException
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.
public java.lang.Object getOutputBuffer() throws java.rmi.RemoteException
public void setOutputBuffer(int theIndex, java.lang.Object theObject) throws java.rmi.RemoteException
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.
public java.lang.Object getOutputBuffer(int theIndex) throws java.rmi.RemoteException
theIndex
- the location within the output buffer that is to be
retrieved.
public boolean hasOutputBuffer() throws java.rmi.RemoteException
public java.lang.String[] getOutputBufferAsStringArray() throws java.rmi.RemoteException
public java.util.Enumeration getOutputBufferContents() throws java.rmi.RemoteException
public void addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection) throws java.rmi.RemoteException
theAbleBufferConnection
- An AbleBufferConnection object
public void removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection) throws java.rmi.RemoteException
theAbleBufferConnection
- An AbleBufferConnection object.
public java.util.Vector getSourceBufferConnections() throws java.rmi.RemoteException
public void addDestBufferConnection(AbleBufferConnection theAbleBufferConnection) throws java.rmi.RemoteException
theAbleBufferConnection
- An AbleBufferConnection object.
public void removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection) throws java.rmi.RemoteException
theAbleBufferConnection
- An AbleBufferConnection object.
public java.util.Vector getDestBufferConnections() throws java.rmi.RemoteException
public boolean isConnectable() throws java.rmi.RemoteException
public void processBufferConnections() throws java.rmi.RemoteException
This method moves data from connected source objects to members in this bean (the inputBuffer)
public void removeAllBufferConnections() throws java.rmi.RemoteException
public void addPropertyConnection(AblePropertyConnection thePropertyConnection) throws java.rmi.RemoteException
public void removePropertyConnection(AblePropertyConnection thePropertyConnection) throws java.rmi.RemoteException
public AblePropertyConnectionManager getPropertyConnectionManager() throws java.rmi.RemoteException
public void addPropertyChangeListener(java.beans.PropertyChangeListener theListener) throws java.rmi.RemoteException
theListener
- An object interested in this bean.
public void removePropertyChangeListener(java.beans.PropertyChangeListener theListener) throws java.rmi.RemoteException
theListener
- The object no longer interested in this bean.
public void propertyChange(java.beans.PropertyChangeEvent theEvent) throws java.rmi.RemoteException
theEvent
- A property change event in which we may be interested.
public void init() throws java.rmi.RemoteException
public void init(java.lang.Object theArg) throws java.rmi.RemoteException
theArg
- An Object used to initialize the bean.
public void reset() throws java.rmi.RemoteException
public void process() throws java.rmi.RemoteException
public void setSleepTime(long theSleepTime) throws java.rmi.RemoteException
theSleepTime
- The number of milliseconds for which the process is to
sleep before it awakes and calls processTimerEvent().
AbleEventQueueProcessor.processTimerEvent()
public long getSleepTime() throws java.rmi.RemoteException
public void setTimerEventProcessingEnabled(boolean theEnabledFlag) throws java.rmi.RemoteException
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.
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.
setSleepTime(long)
,
AbleEventQueueProcessor.processTimerEvent()
,
startEnabledEventProcessing()
public boolean isTimerEventProcessingEnabled() throws java.rmi.RemoteException
public void setAbleEventProcessingEnabled(int theEnabledFlag) throws java.rmi.RemoteException, java.lang.IllegalArgumentException
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.
theEnabledFlag
- Specify one of the following values:
AbleEventQueueProcessor.processAbleEvent(AbleEvent)
,
startEnabledEventProcessing()
public int getAbleEventProcessingEnabled() throws java.rmi.RemoteException
public void flushAbleEventQueue() throws java.rmi.RemoteException
public int getAbleEventQueueSize() throws java.rmi.RemoteException
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() throws java.rmi.RemoteException
In this thread, the bean can perform one, both, or none of these actions, depending on what is enabled (see the related method links):
setTimerEventProcessingEnabled(boolean)
,
setAbleEventProcessingEnabled(int)
,
quitEnabledEventProcessing()
public void quitEnabledEventProcessing() throws java.rmi.RemoteException
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.
startEnabledEventProcessing()
,
setAbleEventProcessingEnabled(int)
public void suspendEnabledEventProcessing() throws java.rmi.RemoteException
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.
resumeEnabledEventProcessing()
,
setAbleEventProcessingEnabled(int)
public void resumeEnabledEventProcessing() throws java.rmi.RemoteException
Timer event processing and ABLE event processing resume if these actions are enabled.
suspendEnabledEventProcessing()
,
setAbleEventProcessingEnabled(int)
,
setTimerEventProcessingEnabled(boolean)
public void restartEnabledEventProcessing() throws java.rmi.RemoteException
Timer event processing and ABLE event processing resume if these actions are enabled.
setAbleEventProcessingEnabled(int)
,
setTimerEventProcessingEnabled(boolean)
public void quitAll() throws java.rmi.RemoteException
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.
quitEnabledEventProcessing()
public void suspendAll() throws java.rmi.RemoteException
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.
suspendEnabledEventProcessing()
public void resumeAll() throws java.rmi.RemoteException
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.
resumeEnabledEventProcessing()
public void addAbleEventListener(AbleEventListener theListener) throws java.rmi.RemoteException
theListener
- An object interested in this bean.
public void removeAbleEventListener(AbleEventListener theListener) throws java.rmi.RemoteException
theListener
- The object no longer interested in this bean.
public void notifyAbleEventListeners(AbleEvent theEvent) throws java.rmi.RemoteException
theEvent
- The AbleEvent to be broadcast to all listeners.
public java.util.Vector getAbleEventListeners() throws java.rmi.RemoteException
public void saveToFile() throws java.rmi.RemoteException, java.io.IOException
setFileName(String)
,
getFileName()
public void saveToFile(java.lang.String theFileName) throws java.rmi.RemoteException, java.io.IOException
theFileName
- The name of the file to write.
public AbleBean restoreFromFile() throws java.rmi.RemoteException, java.lang.ClassNotFoundException, java.io.IOException
setFileName(String)
,
getFileName()
,
saveToFile(String)
public AbleBean restoreFromFile(java.lang.String theFileName) throws java.rmi.RemoteException, java.lang.ClassNotFoundException, java.io.IOException
theFileName
- The name of the file containing the serialized AbleBean
|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |