|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.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, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
Constructor Summary | |
---|---|
AbleRuleAgent()
|
|
AbleRuleAgent(java.lang.String aName)
|
Method Summary | |
---|---|
static java.lang.String |
Copyright()
Determine the copyright of this class. |
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()
Stop all of the bean's asynchronous threads of control. |
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, getState, getTraceLogger, init, isChanged, setChanged, setComment, setLogger, setName, setParent, 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, 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 class AbleObject
com.ibm.able.AbleBean
AbleException
- If an error occurs.public void reset() throws AbleException
reset
in class AbleDefaultAgent
com.ibm.able.AbleDefaultAgent
AbleException
- 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
public void process() throws AbleException
process
in class AbleDefaultAgent
com.ibm.able.AbleDefaultAgent
AbleException
- If an error occurs. Errors from each contained
bean are accumulated.public java.lang.Object process(java.lang.Object theArg) throws AbleException
process
in class AbleObject
theArg
- An Object[] of input values to be bound to the inputBuffer of the
behavior rulesetpublic void processTimerEvent() throws AbleException
processTimerEvent
in class AbleObject
com.ibm.able.AbleEventQueueProcessor
AbleException
- If an error occurs.public void processAbleEvent(AbleEvent theAbleEvent) throws AbleException
AbleEventQueueProcessor
This 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 class AbleObject
com.ibm.able.AbleEventQueueProcessor
theAbleEvent
- The event to process.AbleException
- If an error occurs.public void quitAll() throws AbleException
AbleBean
AbleState.Unknown
.
If the bean is a simple AbleBean, this method just calls
AbleEventQueueManager.quitEnabledEventProcessing()
.
A bean implementing AbleBeanContainer
should call quitAll
on each bean it contains and accumulate errors from each contained bean.
quitAll
in class AbleDefaultAgent
com.ibm.able.AbleBean
AbleException
- If an error occurs.public static java.lang.String Copyright()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |