Jadex 0.941

jadex.runtime
Interface IPlanExecutor

All Known Implementing Classes:
JavaMobilePlanExecutor, JavaStandardPlanExecutor

public interface IPlanExecutor

The plan executor is responsible for creating plan bodies and executing plan steps. Different implementations may exist for different types of plan bodies.


Method Summary
 Object createPlanBody(jadex.runtime.impl.RPlan plan)
          Create the body of a plan.
 boolean executePlanStep(jadex.runtime.impl.RPlan plan)
          Execute a step of a plan.
 Thread getExecutionThread(jadex.runtime.impl.RPlan rplan)
          Get the executing thread of a plan.
 void interruptPlanStep(jadex.runtime.impl.RPlan plan)
          Interrupt a plan step during execution.
 void terminatePlan(jadex.runtime.impl.RPlan rplan)
          Called on termination of a plan.
 

Method Detail

createPlanBody

public Object createPlanBody(jadex.runtime.impl.RPlan plan)
                      throws Exception
Create the body of a plan.

Parameters:
plan - The plan.
Returns:
The created body. May throw any kind of exception, when the body creation fails
Throws:
Exception

executePlanStep

public boolean executePlanStep(jadex.runtime.impl.RPlan plan)
                        throws Exception
Execute a step of a plan. Executing a step should cause the latest event to be handled. Will be called by the scheduler for every event to be handled. May throw any kind of exception, when the plan execution fails

Returns:
True, if plan was interrupted (micro plan step).
Throws:
Exception

interruptPlanStep

public void interruptPlanStep(jadex.runtime.impl.RPlan plan)
Interrupt a plan step during execution. The plan is requested to stop the execution to allow consequences of performed plan actions (like belief changes) taking place. If the method is not implemented the plan step will be NOT be interrupted.


terminatePlan

public void terminatePlan(jadex.runtime.impl.RPlan rplan)
Called on termination of a plan. Free all associated ressources, stop threads, etc.


getExecutionThread

public Thread getExecutionThread(jadex.runtime.impl.RPlan rplan)
Get the executing thread of a plan.

Parameters:
rplan - The plan.

Jadex 0.941

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2005 Lars Braubach, Alexander Pokahr, Andrzej Walczak - University of Hamburg. Use is subject to license terms.