| 
 | Jadex 0.96-beta1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjadex.runtime.AbstractPlan
jadex.runtime.Plan
public abstract class Plan
A plan (in our context more a plan body) contains actions for accomplishing a target state. Additionally to plan belongs (stored in plan info): - filters (waitqueuefilter, planfilter) Subclasses of plan have to implement the action method.
| Constructor Summary | |
|---|---|
| Plan()Create a new plan. | |
| Method Summary | |
|---|---|
|  void | aborted()The plan was aborted (because of conditional goal success or termination from outside). | 
| abstract  void | body()The body method is called on the instatiated plan instance from the scheduler. | 
|  void | dispatchSubgoalAndWait(IGoal subgoal)A shortcut for dispatching a goal as subgoal of the active goal,, and waiting for the subgoal to be finished (without timout). | 
|  void | dispatchSubgoalAndWait(IGoal subgoal,
                       long timeout)A shortcut for dispatching a goal as subgoal of the active goal and waiting for the subgoal to be finished. | 
|  void | failed()The failed method is called on plan failure/abort. | 
|  IEvent | getInitialEvent()Get the initial event, which might differ from the plans rootgoal. | 
|  void | passed()The passed method is called on plan success. | 
|  IMessageEvent | sendMessageAndWait(IMessageEvent me)Send a message and wait for the answer. | 
|  IMessageEvent | sendMessageAndWait(IMessageEvent me,
                   long timeout)Send a message and wait for the answer. | 
|  IEvent | waitFor(IFilter filter)Wait for an event. | 
|  IEvent | waitFor(IFilter filter,
        long timeout)Wait for an event or until the timeout occurs. | 
|  void | waitFor(long duration)Wait for a some time. | 
|  Object | waitForBeliefChange(String type)Wait for a belief change. | 
|  Object | waitForBeliefChange(String type,
                    long timeout)Wait for a belief change. | 
|  void | waitForBeliefSetChange(String type)Wait for a belief set change. | 
|  void | waitForBeliefSetChange(String type,
                       long timeout)Wait for a belief set change. | 
|  void | waitForCondition(ICondition condition)Wait for a condition to be satisfied. | 
|  void | waitForCondition(ICondition condition,
                 long timeout)Wait for a condition or until the timeout occurs. | 
|  void | waitForCondition(String condition)Wait for a condition to be satisfied. | 
|  void | waitForCondition(String condition,
                 long timeout)Wait for a condition to be satisfied. | 
|  Object | waitForFactAdded(String type)Wait for a belief set change. | 
|  Object | waitForFactAdded(String type,
                 long timeout)Wait for a belief set change. | 
|  Object | waitForFactAddedOrRemoved(String type)Wait for a belief set change. | 
|  Object | waitForFactAddedOrRemoved(String type,
                          long timeout)Wait for a belief set change. | 
|  Object | waitForFactRemoved(String type)Wait for a belief set change. | 
|  Object | waitForFactRemoved(String type,
                   long timeout)Wait for a belief set change. | 
|  IGoal | waitForGoal(String type)Wait for a goal. | 
|  IGoal | waitForGoal(String type,
            long timeout)Wait for a goal. | 
|  IInternalEvent | waitForInternalEvent(String type)Wait for an internal event. | 
|  IInternalEvent | waitForInternalEvent(String type,
                     long timeout)Wait for an internal event. | 
|  IMessageEvent | waitForMessageEvent(String type)Wait for a message event. | 
|  IMessageEvent | waitForMessageEvent(String type,
                    long timeout)Wait for a message event. | 
|  IMessageEvent | waitForReply(IMessageEvent msgevent)Wait for a message. | 
|  IMessageEvent | waitForReply(IMessageEvent msgevent,
             long timeout)Wait for a message. | 
|  void | waitForSubgoal(IGoal goal)Wait for a goal. | 
|  void | waitForSubgoal(IGoal goal,
               long timeout)Wait for a goal. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Plan()
| Method Detail | 
|---|
public abstract void body()
public void passed()
public void failed()
public void aborted()
public IEvent getInitialEvent()
public void waitFor(long duration)
duration - The duration.public void waitForCondition(ICondition condition)
condition - The condition.
public void waitForCondition(ICondition condition,
                             long timeout)
condition - The condition.timeout - The timeout.public void waitForCondition(String condition)
condition - The condition.
public void waitForCondition(String condition,
                             long timeout)
condition - The condition.
public void dispatchSubgoalAndWait(IGoal subgoal)
                            throws GoalFailureException
subgoal - The new subgoal.
GoalFailureException - when the goal fails.
public void dispatchSubgoalAndWait(IGoal subgoal,
                                   long timeout)
subgoal - The new subgoal.timeout - The timeout.public IInternalEvent waitForInternalEvent(String type)
type - The internal event type.
public IInternalEvent waitForInternalEvent(String type,
                                           long timeout)
type - The internal event type.timeout - The timeout.public IMessageEvent sendMessageAndWait(IMessageEvent me)
me - The message event.
public IMessageEvent sendMessageAndWait(IMessageEvent me,
                                        long timeout)
me - The message event.timeout - The timeout.
public IMessageEvent waitForMessageEvent(String type)
type - The message event type.
public IMessageEvent waitForMessageEvent(String type,
                                         long timeout)
type - The message event type.timeout - The timeout.public IMessageEvent waitForReply(IMessageEvent msgevent)
msgevent - The message event.
public IMessageEvent waitForReply(IMessageEvent msgevent,
                                  long timeout)
msgevent - The message event.public IGoal waitForGoal(String type)
type - The goal type.
public IGoal waitForGoal(String type,
                         long timeout)
type - The goal type.timeout - The timeout.public void waitForSubgoal(IGoal goal)
goal - The goal.
public void waitForSubgoal(IGoal goal,
                           long timeout)
goal - The goal.timeout - The timeout.public Object waitForBeliefChange(String type)
type - The internal event type.
public Object waitForBeliefChange(String type,
                                  long timeout)
type - The belief type.timeout - The timeout.public void waitForBeliefSetChange(String type)
type - The belief set type.
public void waitForBeliefSetChange(String type,
                                   long timeout)
type - The belief set type.timeout - The timeout.public Object waitForFactAddedOrRemoved(String type)
type - The belief set type.
public Object waitForFactAddedOrRemoved(String type,
                                        long timeout)
type - The belief set type.timeout - The timeout.
public Object waitForFactAdded(String type)
type - The belief set type.
public Object waitForFactAdded(String type,
                               long timeout)
type - The belief set type.timeout - The timeout.
public Object waitForFactRemoved(String type)
type - The belief set type.
public Object waitForFactRemoved(String type,
                                 long timeout)
type - The belief set type.timeout - The timeout.
public IEvent waitFor(IFilter filter)
filter - The event filter.
  //@deprecated Should be avoided but in certain cases maybe cannot
public IEvent waitFor(IFilter filter,
                      long timeout)
filter - The event filter.timeout - The timeout.
  //@deprecated Should be avoided but in certain cases maybe cannot| 
 | Jadex 0.96-beta1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.