jadex.bdi.planlib.protocols
Class AbstractInitiatorPlan

java.lang.Object
  extended by jadex.bdi.runtime.impl.AbstractPlan
      extended by jadex.bdi.runtime.Plan
          extended by jadex.bdi.planlib.protocols.AbstractInitiatorPlan
All Implemented Interfaces:
ISuspendable, java.io.Serializable
Direct Known Subclasses:
CNPInitiatorPlan, DAInitiatorPlan, EAInitiatorPlan, RPInitiatorPlan, RPQPInitiatorPlan

public abstract class AbstractInitiatorPlan
extends Plan

This plan serves as a base class for initiator plans. It automatically handles protocol cancellation when the plan is aborted.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jadex.bdi.runtime.Plan
Plan.SyncResultListener
 
Field Summary
 
Fields inherited from class jadex.bdi.runtime.Plan
lis
 
Fields inherited from class jadex.bdi.runtime.impl.AbstractPlan
interpreter, planinit
 
Constructor Summary
AbstractInitiatorPlan()
          Initialize the plan
 
Method Summary
 void aborted()
          Called when the plan is aborted, i.e., when the corresponding interaction goal is dropped.
protected abstract  IMessageEvent getInitialMessage()
          Get the initial message.
 long getTimeout()
          Get the timeout.
 
Methods inherited from class jadex.bdi.runtime.Plan
body, createWaitAbstraction, dispatchSubgoalAndWait, dispatchSubgoalAndWait, failed, getMonitor, isEventRegisteredInWaitqueue, passed, resume, sendMessageAndWait, sendMessageAndWait, suspend, waitFor, waitForCondition, waitForCondition, waitForEver, waitForExternalCondition, waitForExternalCondition, waitForFactAdded, waitForFactAdded, waitForFactAddedOrRemoved, waitForFactAddedOrRemoved, waitForFactChanged, waitForFactChanged, waitForFactRemoved, waitForFactRemoved, waitForGoal, waitForGoal, waitForGoal, waitForGoal, waitForInternalEvent, waitForInternalEvent, waitForMessageEvent, waitForMessageEvent, waitForReply, waitForReply, waitForTick, waitForWaitAbstraction, waitForWaitAbstraction
 
Methods inherited from class jadex.bdi.runtime.impl.AbstractPlan
createComponentIdentifier, createComponentIdentifier, createComponentIdentifier, createExpression, createExpression, createGoal, createInternalEvent, createMessageEvent, dispatchInternalEvent, dispatchSubgoal, dispatchTopLevelGoal, endAtomic, fail, fail, fail, getBeliefbase, getBody, getClock, getComponentIdentifier, getComponentName, getDispatchedElement, getEventbase, getException, getExpression, getExpressionbase, getExternalAccess, getFlyweight, getGoalbase, getInterpreter, getLifecycleState, getLogger, getParameter, getParameters, getParameterSet, getParameterSets, getPlanbase, getPlanElement, getPropertybase, getRCapability, getReason, getRPlan, getScope, getState, getTime, getType, getWaitqueue, hasParameter, hasParameterSet, killAgent, sendMessage, startAtomic, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractInitiatorPlan

public AbstractInitiatorPlan()
Initialize the plan

Method Detail

getTimeout

public long getTimeout()
Get the timeout.


aborted

public void aborted()
Called when the plan is aborted, i.e., when the corresponding interaction goal is dropped. Terminates the interaction using the FIPA-Cancel-Meta-Protocol.

Overrides:
aborted in class Plan

getInitialMessage

protected abstract IMessageEvent getInitialMessage()
Get the initial message. Has to be provided by subclasses. Needed for sending cancel message in correct conversation.



Copyright © 2010. All Rights Reserved.