|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.AbleObject
com.ibm.able.AbleDefaultAgent
com.ibm.able.agents.AbleRuleAgent
The AbleRuleAgent whose behavior is defined by a single AbleRuleSet bean. The init(), process(), processTimerEvent(), processAbleEvent() behaviors are defined by the corresponding ruleblocks in the ruleset bean. The behavior ruleset can be defined by filename or by reference to the object.
| Field Summary | |
|---|---|
protected AbleRuleSet |
behaviorRuleSet
The behavior ruleset bean used to define the agent's behavior |
protected java.lang.String |
behaviorRuleSetFileName
The name of the filename of the ruleset used to define the agent's behavior |
static java.lang.String |
defaultName
Value assigned to name by default. |
protected static long |
serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx |
| Fields inherited from class com.ibm.able.AbleDefaultAgent |
|---|
activeDataSource, eventConnections, myBeans, numEpochs, processList, processListOK, userDefinedFunctions |
| Fields inherited from class com.ibm.able.AbleObject |
|---|
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
| Constructor Summary | |
|---|---|
AbleRuleAgent()
|
|
AbleRuleAgent(java.lang.String aName)
|
|
| Method Summary | |
|---|---|
AbleRuleSet |
getBehaviorRuleSet()
Get the ruleset bean which provides the agent behavior. |
java.lang.String |
getBehaviorRuleSetFileName()
Get the file name of the ruleset used to define the agent' behavior |
void |
init()
Initialize the Rule agent by constructing and initializing the behavior ruleset bean. |
void |
process()
Invoke the behaviorRuleSet to process input buffer The AbleRuleAgent inputBuffer is passed to the behaviorRuleSet (if any) The behaviorRuleSet outputBuffer (if any) is passed to the Agent's outputBuffer |
java.lang.Object |
process(java.lang.Object theArg)
Invoke the behaviorRuleSet to process input buffer |
void |
processAbleEvent(AbleEvent theAbleEvent)
Processes an Able event synchronously; that is, on the same thread as the caller. |
void |
processTimerEvent()
Invoke the processTimerEvent method on the behavior ruleset. |
void |
quitAll()
Quits all forms of processing for this bean. |
void |
reset()
Reset the behavior ruleset bean in the agent if it exists. |
void |
setBehaviorRuleSet(AbleRuleSet theRuleSet)
Set the ruleset bean which provides the agent behavior |
void |
setBehaviorRuleSetFileName(java.lang.String fileName)
Set the file name of the ruleset used to define the agent's behavior |
protected void |
setDefaults()
Set processing options to default values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.able.AbleBean |
|---|
getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, init, isChanged, removeProperty, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger |
| Methods inherited from interface com.ibm.able.AbleEventListenerManager |
|---|
addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener |
| Methods inherited from interface com.ibm.able.AbleEventQueueProcessor |
|---|
processNoEventProcessingEnabledSituation |
| Methods inherited from interface com.ibm.able.AblePropertyChangeManager |
|---|
addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection |
| Methods inherited from interface com.ibm.able.AbleSerializable |
|---|
getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName |
| Methods inherited from interface com.ibm.able.AbleBeanContainer |
|---|
getName |
| Field Detail |
public static final java.lang.String defaultName
protected static final long serialVersionUID
protected AbleRuleSet behaviorRuleSet
protected java.lang.String behaviorRuleSetFileName
| Constructor Detail |
public AbleRuleAgent()
throws AbleException
public AbleRuleAgent(java.lang.String aName)
throws AbleException
| Method Detail |
public void setBehaviorRuleSetFileName(java.lang.String fileName)
public java.lang.String getBehaviorRuleSetFileName()
public AbleRuleSet getBehaviorRuleSet()
public void setBehaviorRuleSet(AbleRuleSet theRuleSet)
public void init()
throws AbleException
init in interface AbleBeaninit in class AbleDefaultAgentAbleExceptionAbleObject.init()
public void reset()
throws AbleException
reset in interface AbleBeanreset in class AbleDefaultAgentAbleException - If an error occurs when resetting
a contained bean. All errors are
collected and insert into the exception
so that one bean's error does not
prevent another from being reset.
protected void setDefaults()
throws AbleException
AbleException
public void process()
throws AbleException
process in interface AbleBeanprocess in class AbleDefaultAgentAbleException - If an error occurs. Errors from each contained
bean are accumulated.
public java.lang.Object process(java.lang.Object theArg)
throws AbleException
process in interface AbleBeanprocess in class AbleObjecttheArg - An Object[] of input values to be bound to the inputBuffer of the
behavior ruleset
AbleException - In the following situations:
AbleObject.inputBuffer,
AbleObject.outputBuffer,
AbleBean.process()
public void processTimerEvent()
throws AbleException
processTimerEvent in interface AbleEventQueueProcessorprocessTimerEvent in class AbleObjectAbleException - If an error occurs.
public void processAbleEvent(AbleEvent theAbleEvent)
throws AbleException
AbleEventQueueProcessorThis method is called by the AbleEventQueue when an event is removed from the queue for asynchronous processing. Note that this method also can be called directly from the handleAbleEvent() method described in the AbleEventListener interface when that method is given a synchronous event to handle.
processAbleEvent in interface AbleEventQueueProcessorprocessAbleEvent in class AbleObjecttheAbleEvent - The event to process.
AbleException - If an error occurs.AbleObject.setAbleEventProcessingEnabled(int),
AbleObject.startEnabledEventProcessing(),
AbleObject.handleAbleEvent(AbleEvent)
public void quitAll()
throws AbleException
AbleBeanAbleState.Unknown, and it should
be considered unusable for further processing.
A simple AbleBean may just call
AbleEventQueueManager.quitEnabledEventProcessing().
A more complex bean may also clear itself of references so
that garbage collection can occur.
A bean implementing AbleBeanContainer should call
quitAll on each bean it contains and accumulate errors from each
contained bean.
quitAll in interface AbleBeanquitAll in class AbleDefaultAgentAbleException
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||