Package jade.core.behaviours
Class SerialBehaviour
- java.lang.Object
-
- jade.core.behaviours.Behaviour
-
- jade.core.behaviours.CompositeBehaviour
-
- jade.core.behaviours.SerialBehaviour
-
- All Implemented Interfaces:
Serializable,Serializable
- Direct Known Subclasses:
FSMBehaviour,SequentialBehaviour
public abstract class SerialBehaviour extends CompositeBehaviour
Base class for all composite behaviour whose children run serially, i.e. the composite behaviour is blocked if and only if its current child is blocked.- Author:
- Giovanni Caire - Telecom Italia Lab
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
-
-
Field Summary
-
Fields inherited from class jade.core.behaviours.CompositeBehaviour
currentExecuted
-
Fields inherited from class jade.core.behaviours.Behaviour
myAgent, myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSerialBehaviour()Create a newSerialBehaviourobject, without setting the owner agent.protectedSerialBehaviour(Agent a)Create a newSerialBehaviourobject and set the owner agent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidhandle(Behaviour.RunnableChangedEvent rce)Handle block/restart notifications.-
Methods inherited from class jade.core.behaviours.CompositeBehaviour
action, checkTermination, done, getChildren, getCurrent, handleBlockEvent, handleRestartEvent, registerAsChild, reset, resetChildren, scheduleFirst, scheduleNext, setAgent
-
Methods inherited from class jade.core.behaviours.Behaviour
actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, isRunnable, onEnd, onStart, restart, root, setBehaviourName, setDataStore, setExecutionState
-
-
-
-
Constructor Detail
-
SerialBehaviour
protected SerialBehaviour()
Create a newSerialBehaviourobject, without setting the owner agent.
-
SerialBehaviour
protected SerialBehaviour(Agent a)
Create a newSerialBehaviourobject and set the owner agent.- Parameters:
a- The agent owning this behaviour.
-
-
Method Detail
-
handle
protected void handle(Behaviour.RunnableChangedEvent rce)
Handle block/restart notifications. ASerialBehaviouris blocked only when its currently active child is blocked, and becomes ready again when its current child is ready. This method takes care of the various possibilities.
-
-