public abstract class BeliefGoalPlanBody extends AbstractPlanBody
BeliefGoal. It verifies when the
plan begins its execution if the goal is already achieved. If so, nothing is
performed, otherwise the method execute() is invoked, as a
replacement of the action() method.| Constructor and Description |
|---|
BeliefGoalPlanBody() |
| Modifier and Type | Method and Description |
|---|---|
void |
action()
This final implementation of the action method verifies the belief goal
that triggered this plan body execution is already achieved (
isGoalAchieved()). |
protected abstract void |
execute()
This method is a placeholder for subclasses that should implement the set
of steps needed to achieve this plan body goal.
|
Belief<?,?> |
getOutputBelief() |
protected void |
init()
This method is a placeholder for subclasses.
|
protected boolean |
isGoalAchieved()
Returns true if the goal of this plan body was achieved.
|
void |
onStart()
Verifies if the goal that triggered this plan body execution is a
BeliefGoal. |
dispatchGoal, dispatchSubgoal, dispatchSubgoalAndListen, done, getBeliefBase, getCapability, getEndState, getGoal, getGoalEvent, getGoalEvent, getGoalEvent, getPlan, goalPerformed, init, setEndState, start, stopactionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getParent, getRestartCounter, handle, handleBlockEvent, handleRestartEvent, isRunnable, onEnd, reset, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionStatepublic final void action()
isGoalAchieved()). If not, it invokes the execute()
method;action in class jade.core.behaviours.Behaviourprotected abstract void execute()
@Parameter(direction=OUT) public Belief<?,?> getOutputBelief()
protected void init()
onStart() method, after it performs some pre-processing.protected boolean isGoalAchieved()
public final void onStart()
BeliefGoal. If not, it throws an IllegalArgumentException
.