|
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.beans.petrinet.AblePetriNet
This class represents a Petri net. For more information refer to the PetriNetAgent details or PetriNetTutorial.
| Field Summary | |
|---|---|
protected java.util.Vector |
myArcs
|
protected java.lang.ClassLoader |
myClassLoader
Classloader to use to dynamically load and create user data types. |
protected java.util.Vector |
myInitializationExpressions
|
protected java.util.Vector |
myPlaces
|
protected AbleRuleSet |
myRuleSet
|
protected java.util.Vector |
myTransitions
|
| Fields inherited from class com.ibm.able.AbleDefaultAgent |
|---|
activeDataSource, defaultName, 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 | |
|---|---|
AblePetriNet()
Construct an instance of a Petri net |
|
AblePetriNet(java.lang.String theName)
Construct an instance of a Petri net |
|
| Method Summary | |
|---|---|
void |
addArc(AblePetriArc theArc)
|
void |
addBean(AbleBean theAbleBean)
Adds a bean to this container/agent. |
void |
addDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
Adds a destination buffer connection. |
void |
addPlace(AblePetriPlace thePlace)
|
void |
addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
Adds a source buffer connection. |
void |
addTransition(AblePetriTransition theTransition)
|
protected void |
buildProcessList()
Examine the list of contained beans AbleDefaultAgent.myBeans for dataflow
connections, building a sequential processing list. |
protected void |
createRuleSet()
|
java.util.Vector |
getArcs()
|
java.lang.ClassLoader |
getClassLoader()
Retrieve the Classloader used to load and create user data types |
java.util.Vector |
getDestBufferConnections()
Returns the list of all destination (output) buffer connections. |
java.lang.String |
getExpressionText()
|
AbleInferenceEngine |
getInferenceEngine()
|
java.util.Vector |
getPlaces()
|
AbleRule |
getRule(java.lang.String theRuleLabel)
|
AbleRuleSet |
getRuleSet()
|
java.util.Vector |
getSourceBufferConnections()
Returns a list of all source (input) buffer connections. |
java.util.Vector |
getTransitions()
|
AbleVariable |
getVariable(java.lang.String theVarName)
|
java.util.Vector |
getVariables()
|
java.lang.String |
getVariablesText()
|
void |
init()
Initialize the agent. |
void |
process()
Performs the main, synchronous, standard processing function performed by this bean. |
void |
processTimerEvent()
If running in autonomous mode, let the sleepTime control the rate we fire transitions |
void |
removeAllBeans()
Removes all beans from this container. |
void |
removeArc(AblePetriArc theArc)
|
void |
removeBean(AbleBean theAbleBean)
Removes a bean from this container, and sets the bean's parent to null. |
void |
removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
Remove a destination buffer connection. |
void |
removePlace(AblePetriPlace thePlace)
|
void |
removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
Removes a source buffer connection. |
void |
removeTransition(AblePetriTransition theTransition)
|
void |
setClassLoader(java.lang.ClassLoader theClassLoader)
Set the Classloader to be used to load and create user data types |
void |
setExpressionText(java.lang.String text)
|
void |
setVariablesText(java.lang.String text)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ibm.able.AbleBean |
|---|
getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, init, isChanged, process, 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 |
|---|
processAbleEvent, 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 |
protected java.util.Vector myPlaces
protected java.util.Vector myTransitions
protected java.util.Vector myArcs
protected java.util.Vector myInitializationExpressions
protected transient AbleRuleSet myRuleSet
protected transient java.lang.ClassLoader myClassLoader
| Constructor Detail |
public AblePetriNet()
throws AbleException
public AblePetriNet(java.lang.String theName)
throws AbleException
| Method Detail |
public java.util.Vector getPlaces()
public java.util.Vector getTransitions()
public java.util.Vector getArcs()
public void addPlace(AblePetriPlace thePlace)
public void removePlace(AblePetriPlace thePlace)
public void addTransition(AblePetriTransition theTransition)
public void removeTransition(AblePetriTransition theTransition)
public void addArc(AblePetriArc theArc)
public void removeArc(AblePetriArc theArc)
public void init()
throws AbleException
AbleDefaultAgent
Contained beans are not initialized explicitly
because some agents manage their contained beans directly.
To initialize all contained beans, use AbleDefaultAgent.initAllBeans().
init in interface AbleBeaninit in class AbleDefaultAgentAbleExceptionAbleObject.init()
protected void createRuleSet()
throws AbleException
AbleExceptionpublic AbleInferenceEngine getInferenceEngine()
public AbleRule getRule(java.lang.String theRuleLabel)
public AbleRuleSet getRuleSet()
public AbleVariable getVariable(java.lang.String theVarName)
public java.util.Vector getVariables()
public void processTimerEvent()
throws AbleException
processTimerEvent in interface AbleEventQueueProcessorprocessTimerEvent in class AbleObjectAbleException - If an error occurs.
public void process()
throws AbleException
AbleDefaultAgentAbleEvent.DATACHANGED event is propagated
to registered listeners.
In this implementation, a single processing step is performed by walking through the process list and calling the process() method on each DataFlowEnabled AbleBean contained within this agent. If the agent itself is DataFlowEnabled, its inputBuffer is passed to the first bean in the process list, and the outputBuffer from the last bean in the process list populates the agent's outputBuffer.
process in interface AbleBeanprocess in class AbleDefaultAgentAbleException - If an error occurs. Errors from each contained
bean are accumulated.public void addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
An AbleProperty.SourceBufferConnections PropertyChangeEvent is fired.
addSourceBufferConnection in interface AbleDataBufferManageraddSourceBufferConnection in class AbleObjecttheAbleBufferConnection - An AbleBufferConnection object including a bean whose output buffer
populates this bean's input buffer.public void removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)
An AbleProperty.SourceBufferConnections PropertyChangeEvent is fired.
removeSourceBufferConnection in interface AbleDataBufferManagerremoveSourceBufferConnection in class AbleObjecttheAbleBufferConnection - The AbleBufferConnection object to be removed.public java.util.Vector getSourceBufferConnections()
AbleDataBufferManager
getSourceBufferConnections in interface AbleDataBufferManagergetSourceBufferConnections in class AbleObjectpublic void addDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
An AbleProperty.DestBufferConnections PropertyChangeEvent is fired.
addDestBufferConnection in interface AbleDataBufferManageraddDestBufferConnection in class AbleObjecttheAbleBufferConnection - An AbleBufferConnection object including a bean whose input
buffer is to be populated from this bean's output buffer.public void removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection)
An AbleProperty.DestBufferConnections PropertyChangeEvent is fired.
removeDestBufferConnection in interface AbleDataBufferManagerremoveDestBufferConnection in class AbleObjecttheAbleBufferConnection - The AbleBufferConnection object to be removed.public java.util.Vector getDestBufferConnections()
AbleDataBufferManager
getDestBufferConnections in interface AbleDataBufferManagergetDestBufferConnections in class AbleObject
public void addBean(AbleBean theAbleBean)
throws AbleException
AbleDataSource, an event connection between the
bean and this agent will be constructed. Only one data source can be
data flow enabled in a container at one time, so if the added bean is an
an active data source, a previously active contained data source will be
made inactive.
AbleDefaultAgent.processList will be recalculated on its next access or use.
Note that if the bean to be added has a current parent, the bean will be removed from that parent because an ABLE bean can have only one parent at a time. This method will set the specified bean's parent to be this agent.
addBean in interface AbleBeanContaineraddBean in class AbleDefaultAgenttheAbleBean - The bean to be added to this container.
AbleException - If an error occurs.
public void removeBean(AbleBean theAbleBean)
throws AbleException
null.
The following special processing is performed:
AbleDefaultAgent.processList will be recalculated on its next access or use.
removeBean in interface AbleBeanContainerremoveBean in class AbleDefaultAgenttheAbleBean - A bean that is to be removed from this container.
AbleException - If an error occurs.
public void removeAllBeans()
throws AbleException
AbleBeanContainernull.
removeAllBeans in interface AbleBeanContainerremoveAllBeans in class AbleDefaultAgentAbleExceptionpublic java.lang.String toString()
public java.lang.String getVariablesText()
public void setVariablesText(java.lang.String text)
public java.lang.String getExpressionText()
public void setExpressionText(java.lang.String text)
public void setClassLoader(java.lang.ClassLoader theClassLoader)
theClassLoader - The Classloader to be used to load and create user data typespublic java.lang.ClassLoader getClassLoader()
protected void buildProcessList()
throws AbleException
AbleDefaultAgentAbleDefaultAgent.myBeans for dataflow
connections, building a sequential processing list.
Lists all datasource objects first starting with the one
enabled for data flow, then all data buffer-connected objects in sequence,
regardless of if they are on or off.
buildProcessList in class AbleDefaultAgentAbleException - If an error occurs.
|
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 | |||||||||||