Package jadex.bdi.planlib.protocols
Class RPQPInitiatorPlan
- java.lang.Object
-
- jadex.bdiv3x.runtime.Plan
-
- jadex.bdi.planlib.protocols.AbstractInitiatorPlan
-
- jadex.bdi.planlib.protocols.RPQPInitiatorPlan
-
public class RPQPInitiatorPlan extends AbstractInitiatorPlan
The fipa request and query plan performs the initiator side of the fipa-request/query protocol. The parameters have to be specified in the goal. The result of the request is stored in the goal.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jadex.bdiv3x.runtime.Plan
Plan.PlanWaitAbstraction
-
-
Field Summary
Fields Modifier and Type Field Description protected IMessageEvent
request
The request (must be saved because of conversation tracking).protected static java.lang.String
STATUS_TIMEOUT
The state indicating a timeout in this plan.
-
Constructor Summary
Constructors Constructor Description RPQPInitiatorPlan()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
body()
Perform the request.protected IMessageEvent
getInitialMessage()
Get the initial message.protected java.lang.String
getShortProtocolName()
Get protocol abbrev name.protected IMessageEvent
handleFirstAnswer(IMessageEvent answer)
Process the first answer.protected void
handleSecondAnswer(IMessageEvent answer)
Process the second answer.protected void
requestFinished(boolean success, java.lang.Object result)
Method, that is being called, when the request has finished.-
Methods inherited from class jadex.bdi.planlib.protocols.AbstractInitiatorPlan
aborted, getTimeout
-
Methods inherited from class jadex.bdiv3x.runtime.Plan
checkNotInAtomic, createExpression, createGoal, createInternalEvent, createMessageEvent, dispatchInternalEvent, dispatchSubgoal, dispatchSubgoalAndWait, dispatchSubgoalAndWait, dispatchTopLevelGoal, endAtomic, fail, fail, fail, failed, getAgent, getBeliefbase, getClock, getComponentDescription, getComponentIdentifier, getComponentName, getDispatchedElement, getEventbase, getException, getExpression, getExpressionbase, getExternalAccess, getGoalbase, getLogger, getParameter, getParameters, getParameterSet, getParameterSets, getPlanbase, getPlanElement, getReason, getRPlan, getScope, getTime, getWaitqueue, hasParameter, hasParameterSet, killAgent, passed, sendMessage, sendMessageAndWait, sendMessageAndWait, startAtomic, toString, waitFor, waitForCondition, waitForCondition, waitForCondition, waitForConditionInline, waitForConditionInline, waitForEver, waitForFactAdded, waitForFactAdded, waitForFactChanged, waitForFactChanged, waitForFactRemoved, waitForFactRemoved, waitForGoalFinished, waitForGoalFinished, waitForGoalFinished, waitForGoalFinished, waitForInternalEvent, waitForInternalEvent, waitForMessageEvent, waitForMessageEvent, waitForReply, waitForReply, waitForReply, waitForReply, waitForTick
-
-
-
-
Field Detail
-
STATUS_TIMEOUT
protected static final java.lang.String STATUS_TIMEOUT
The state indicating a timeout in this plan.- See Also:
- Constant Field Values
-
request
protected IMessageEvent request
The request (must be saved because of conversation tracking).
-
-
Method Detail
-
body
public void body()
Perform the request.- Overrides:
body
in classAbstractInitiatorPlan
-
handleFirstAnswer
protected IMessageEvent handleFirstAnswer(IMessageEvent answer)
Process the first answer.
-
handleSecondAnswer
protected void handleSecondAnswer(IMessageEvent answer)
Process the second answer.
-
requestFinished
protected void requestFinished(boolean success, java.lang.Object result)
Method, that is being called, when the request has finished. Default implementation sets status and result on goal.- Parameters:
success
- The final status of the df search.result
- The result object.
-
getInitialMessage
protected IMessageEvent getInitialMessage()
Get the initial message.- Specified by:
getInitialMessage
in classAbstractInitiatorPlan
-
getShortProtocolName
protected java.lang.String getShortProtocolName()
Get protocol abbrev name.- Returns:
- The protocol abbrev name.
-
-