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

com.ibm.able.examples.ablebean
Class SimpleAbleBean

java.lang.Object
  |
  +--com.ibm.able.AbleObject
        |
        +--com.ibm.able.examples.ablebean.SimpleAbleBean
All Implemented Interfaces:
AbleBean, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, java.io.Serializable

public class SimpleAbleBean
extends AbleObject

This class is an example of a simple AbleBean created by extending AbleObject. It copies the value of the inputBuffer to the outputBuffer. It sets the simpleBeanColor property to the value of the first output buffer array position.

If no input connection exists or the inputBuffer is null, it will copy the the simpleBeanColor property to the first output buffer array value.

See Also:
Serialized Form

Field Summary
static java.lang.String DefaultBeanColor
           
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, defaultName, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
SimpleAbleBean()
          Construct a simple AbleBean
SimpleAbleBean(java.lang.String aName)
          Construct a simple AbleBean with specified name.
 
Method Summary
static java.lang.String Copyright()
          Determine the copyright of this class.
 java.lang.String getSimpleBeanColor()
          Get the color attribute
 void init()
          Initialize the agent to a known initialized state.
 void process()
          Perform the standard processing function performed by this bean.
 void reset()
          Reset the bean to a known initialized state.
 void setSimpleBeanColor(java.lang.String newBeanColor)
          Set the color attribute Also fire a propertyChange event to notify any propertyChange listeners
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, handleAbleEvent, hasInputBuffer, hasOutputBuffer, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, quitAll, quitEnabledEventProcessing, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeAll, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendAll, suspendEnabledEventProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx

DefaultBeanColor

public static final java.lang.String DefaultBeanColor
Constructor Detail

SimpleAbleBean

public SimpleAbleBean()
               throws AbleException
Construct a simple AbleBean

SimpleAbleBean

public SimpleAbleBean(java.lang.String aName)
               throws AbleException
Construct a simple AbleBean with specified name.
Parameters:
aName - A String object specifying the object name

Method Detail

init

public void init()
          throws AbleException
Initialize the agent to a known initialized state. Start processing any events enabled.
Overrides:
init in class AbleObject
Following copied from class: com.ibm.able.AbleObject
Throws:
AbleException - If an error occurs.
See Also:
AbleObject.startEnabledEventProcessing()

reset

public void reset()
           throws AbleException
Reset the bean to a known initialized state. Fire a global property change event.
Overrides:
reset in class AbleObject
Following copied from class: com.ibm.able.AbleObject
Throws:
AbleException - If an error occurs.
See Also:
AbleBean.reset()

process

public void process()
             throws AbleException
Perform the standard processing function performed by this bean. This typically takes data from the inputBuffer, processes it, and places it in the output buffer.
Overrides:
process in class AbleObject
Throws:
AbleException - either AbleException or process error

setSimpleBeanColor

public void setSimpleBeanColor(java.lang.String newBeanColor)
                        throws AbleException
Set the color attribute Also fire a propertyChange event to notify any propertyChange listeners

getSimpleBeanColor

public java.lang.String getSimpleBeanColor()
Get the color attribute

Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.


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

(C) Copyright IBM Corporation 1999, 2003