Class CNPReceiverPlan
- java.lang.Object
-
- jadex.bdiv3x.runtime.Plan
-
- jadex.bdi.planlib.protocols.AbstractReceiverPlan
-
- jadex.bdi.planlib.protocols.contractnet.CNPReceiverPlan
-
public class CNPReceiverPlan extends AbstractReceiverPlan
Receive a contract net protocol (cnp) and answer it.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jadex.bdiv3x.runtime.Plan
Plan.PlanWaitAbstraction
-
-
Constructor Summary
Constructors Constructor Description CNPReceiverPlan()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
body()
The body method is called on the instantiated plan instance from the scheduler.java.lang.Object
executeTask(java.lang.Object proposal, java.lang.Object proposal_info, IComponentIdentifier initiator)
Execute the task.protected java.lang.String
getShortProtocolName()
Get protocol abbrev name.protected boolean
isIterated()
Test if it is the iterated contract-net version.java.lang.Object[]
makeProposal(java.lang.Object cfp, IComponentIdentifier initiator)
Make a proposal based on the task description.-
Methods inherited from class jadex.bdi.planlib.protocols.AbstractReceiverPlan
failed, passed
-
Methods inherited from class jadex.bdiv3x.runtime.Plan
aborted, checkNotInAtomic, createExpression, createGoal, createInternalEvent, createMessageEvent, dispatchInternalEvent, dispatchSubgoal, dispatchSubgoalAndWait, dispatchSubgoalAndWait, dispatchTopLevelGoal, endAtomic, fail, fail, fail, 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, 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
-
-
-
-
Method Detail
-
body
public void body()
The body method is called on the instantiated plan instance from the scheduler.- Overrides:
body
in classAbstractReceiverPlan
-
isIterated
protected boolean isIterated()
Test if it is the iterated contract-net version.- Returns:
- True, if is is the iterated version.
-
getShortProtocolName
protected java.lang.String getShortProtocolName()
Get protocol abbrev name.- Returns:
- The protocol abbrev name.
-
makeProposal
public java.lang.Object[] makeProposal(java.lang.Object cfp, IComponentIdentifier initiator)
Make a proposal based on the task description.- Parameters:
cfp
- The cfp including the task to execute.- Returns:
- The proposal for executing the task.
-
executeTask
public java.lang.Object executeTask(java.lang.Object proposal, java.lang.Object proposal_info, IComponentIdentifier initiator)
Execute the task.- Parameters:
proposal
- The proposal.proposal_info
- The proposal info.- Returns:
- The result of the task.
-
-