jadex.bdi.planlib.protocols.dutchauction
Class DAReceiverPlan

java.lang.Object
  extended by jadex.bdi.runtime.impl.AbstractPlan
      extended by jadex.bdi.runtime.Plan
          extended by jadex.bdi.planlib.protocols.AbstractReceiverPlan
              extended by jadex.bdi.planlib.protocols.dutchauction.DAReceiverPlan
All Implemented Interfaces:
ISuspendable, java.io.Serializable

public class DAReceiverPlan
extends AbstractReceiverPlan

This plan implements the receiver of the "FIPA Dutch Auction Interaction Protocol Specification" (XC00032 - Experimental). A dutch auction is one where the auctioneer starts with a high start price and continually lowers it until the first bidder accepts the price.

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
DAReceiverPlan()
           
 
Method Summary
 void body()
          The plan body.
protected  java.lang.Object[] decideParticipation(AuctionDescription auctiondesc, IComponentIdentifier initiator)
          Decide about participation.
protected  java.lang.Object[] handleCFP(IMessageEvent cfp, AuctionDescription auctiondesc, java.lang.Object auctioninfo, java.util.List offers)
          Handle a cfp message.
 
Methods inherited from class jadex.bdi.planlib.protocols.AbstractReceiverPlan
failed, passed
 
Methods inherited from class jadex.bdi.runtime.Plan
aborted, createWaitAbstraction, dispatchSubgoalAndWait, dispatchSubgoalAndWait, getMonitor, isEventRegisteredInWaitqueue, 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

DAReceiverPlan

public DAReceiverPlan()
Method Detail

body

public void body()
The plan body.

Specified by:
body in class Plan

decideParticipation

protected java.lang.Object[] decideParticipation(AuctionDescription auctiondesc,
                                                 IComponentIdentifier initiator)
Decide about participation. If the goal is not handled participation is true.

Parameters:
auctiondesc - The auction description.
Returns:
The participation state (Boolean) and the local auction info (Object).

handleCFP

protected java.lang.Object[] handleCFP(IMessageEvent cfp,
                                       AuctionDescription auctiondesc,
                                       java.lang.Object auctioninfo,
                                       java.util.List offers)
Handle a cfp message.

Parameters:
auctiondesc - The auction description.
Returns:
The participation state (Boolean) and the local auction info (Object).


Copyright © 2010. All Rights Reserved.