ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.examples.ablebean
Class SimpleAbleBean

java.lang.Object
  extended bycom.ibm.able.AbleObject
      extended bycom.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, properties, 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
 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, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getProperties, getProperty, getPropertyChangeListeners, 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, removeProperty, 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, setProperties, setProperty, 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

See Also:
Constant Field Values

DefaultBeanColor

public static final java.lang.String DefaultBeanColor
See Also:
Constant Field Values
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.

Specified by:
init in interface AbleBean
Overrides:
init in class 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.

Specified by:
reset in interface AbleBean
Overrides:
reset in class 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.

Specified by:
process in interface AbleBean
Overrides:
process in class AbleObject
Throws:
AbleException - either AbleException or process error
See Also:
AbleObject.inputBuffer, AbleObject.outputBuffer, AbleBean.process()

setSimpleBeanColor

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

Throws:
AbleException

getSimpleBeanColor

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


ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005