ABLE, Version 1.1b

com.ibm.able.examples.ableagent
Class SimpleAbleAgent

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--com.ibm.able.AbleObject
                          |
                          +--com.ibm.able.agents.AbleDefaultAgent
                                |
                                +--com.ibm.able.examples.ableagent.SimpleAbleAgent

public class SimpleAbleAgent
extends AbleDefaultAgent
implements java.io.Serializable

This class is an example of an AbleAgent created by extending AbleDefaultAgent.

See Also:
AbleDefaultAgent, Serialized Form

Field Summary
static java.lang.String[] colors
           
 
Fields inherited from class com.ibm.able.agents.AbleDefaultAgent
activeDataSource, agentAddr, agentHost, agentName, beans, effectors, eventConnections, numEpochs, processList, processListOK, sensors
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
SimpleAbleAgent()
          Construct a simple AbleAgent and initialize it.
SimpleAbleAgent(java.lang.String aName)
          Construct a simple AbleAgent 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 agent.
 void processTimerEvent()
          This method gets called from the asych thread (if running) Default behavior is to just call the process() method
 void reset()
          Reset the agent to default settings.
 void setSimpleBeanColor(java.lang.String newBeanColor)
          Set the color attribute Also fire a propertyChange event and a dataChanged AbleEvent
 
Methods inherited from class com.ibm.able.agents.AbleDefaultAgent
addBean, addEffector, addEventConnection, addSensor, buildProcessList, clsNm, containsBean, containsBean, debugTrace, getAgentAddr, getAgentHost, getAgentName, getBean, getBeans, getDataSource, getEffectors, getNumEpochs, getProcessList, getSensors, handleAbleEvent, init, invokeEffector, invokeSensor, isActiveDataSource, main, propertyChange, quitAll, quitEnabledEventProcessing, removeAllBeans, removeBean, removeEffector, removeEventConnection, removeSensor, resumeAll, rmiRebind, rmiUnbind, setActiveDataSource, setEffectors, setProcessList, setSensors, suspendAll, toString
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getBuffer, getBufferContents, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, hasInputBuffer, hasOutputBuffer, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, sourceConnectionsOK, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

colors

public static final java.lang.String[] colors
Constructor Detail

SimpleAbleAgent

public SimpleAbleAgent()
                throws java.rmi.RemoteException
Construct a simple AbleAgent and initialize it.

SimpleAbleAgent

public SimpleAbleAgent(java.lang.String aName)
                throws java.rmi.RemoteException
Construct a simple AbleAgent with specified name.
Parameters:
aName - A String object specifying the object name
Method Detail

init

public void init()
          throws java.rmi.RemoteException
Initialize the agent to a known initialized state. Start processing any events enabled.
Overrides:
init in class AbleDefaultAgent

reset

public void reset()
           throws java.rmi.RemoteException
Reset the agent to default settings.
Overrides:
reset in class AbleDefaultAgent

process

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

processTimerEvent

public void processTimerEvent()
                       throws java.rmi.RemoteException
This method gets called from the asych thread (if running) Default behavior is to just call the process() method
Overrides:
processTimerEvent in class AbleObject

setSimpleBeanColor

public void setSimpleBeanColor(java.lang.String newBeanColor)
Set the color attribute Also fire a propertyChange event and a dataChanged AbleEvent

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, Version 1.1b

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