public class DAInitiatorPlan extends AbstractInitiatorPlan
Plan.PlanWaitAbstraction
Modifier and Type | Field and Description |
---|---|
protected IMessageEvent |
start
The initial message.
|
Constructor and Description |
---|
DAInitiatorPlan() |
Modifier and Type | Method and Description |
---|---|
void |
aborted()
Called when the plan is aborted, i.e.,
when the corresponding interaction goal
is dropped.
|
protected void |
announceAuction(java.lang.Object auctiondesc,
java.util.List receivers,
java.lang.String convid)
Announce the planned auction.
|
protected void |
announceAuctionEnd(java.util.List receivers,
java.lang.String convid,
java.lang.Object winning_offer,
IComponentIdentifier winner)
Announce the end of the auction to all participants that did not leave the auction.
|
void |
body()
The plan body.
|
protected java.lang.Object[] |
decideIteration(java.lang.Object cfp_info,
java.lang.Object[] history)
Decide about the next iteration.
|
protected void |
evaluateAuctionResults(AuctionDescription auctiondesc,
java.lang.Object cfp_info,
java.lang.Object[] history,
IComponentIdentifier winner,
java.lang.Object winning_offer)
Evaluate the auction results and decide about participation.
|
void |
failed()
The failed method is called on plan failure/abort.
|
protected IMessageEvent |
getInitialMessage()
Get the initial message.
|
void |
passed()
The passed method is called on plan success.
|
protected void |
sendCFP(java.lang.Object cfp,
java.lang.String convid,
java.util.List receivers)
Send cfps to all receivers.
|
protected void |
waitForAuctionStart(AuctionDescription auctiondesc,
java.util.List receivers)
Wait for the auction start time.
|
protected IComponentIdentifier |
waitForProposals(java.lang.Object cfp,
long roundtimeout,
java.util.List receivers)
Wait for proposals of participants.
|
getTimeout
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
protected IMessageEvent start
public void body()
body
in class AbstractInitiatorPlan
public void passed()
Plan
public void failed()
Plan
public void aborted()
AbstractInitiatorPlan
aborted
in class AbstractInitiatorPlan
protected void announceAuction(java.lang.Object auctiondesc, java.util.List receivers, java.lang.String convid)
auctiondesc
- the auction description.receivers
- The receivers.convid
- The conversation id.protected void waitForAuctionStart(AuctionDescription auctiondesc, java.util.List receivers)
auctiondesc
- The auction description.receivers
- The receivers.protected void sendCFP(java.lang.Object cfp, java.lang.String convid, java.util.List receivers)
cfp
- The cfp.convid
- The conversation id.receivers
- The receivers.protected java.lang.Object[] decideIteration(java.lang.Object cfp_info, java.lang.Object[] history)
cfp_info
- The cfp info.history
- The history.protected IComponentIdentifier waitForProposals(java.lang.Object cfp, long roundtimeout, java.util.List receivers)
cfp
- the cfp.roundtimeout
- The round timeout.receivers
- The receivers.protected void evaluateAuctionResults(AuctionDescription auctiondesc, java.lang.Object cfp_info, java.lang.Object[] history, IComponentIdentifier winner, java.lang.Object winning_offer)
auctiondesc
- The auction description.cfp_info
- The cfp info.history
- The historz of cfps.winner
- the winner.winning_offer
- The winning offer.protected void announceAuctionEnd(java.util.List receivers, java.lang.String convid, java.lang.Object winning_offer, IComponentIdentifier winner)
receivers
- The receivers.convid
- The conversation id.winning_offer
- The winning offer.protected IMessageEvent getInitialMessage()
getInitialMessage
in class AbstractInitiatorPlan