fipaos.tutorial.emarkets.agent.buyer.retail
Class RetailBuyerAgent
fipaos.agent.FIPAOSAgent
|
+--fipaos.tutorial.emarkets.agent.SubscribingAgent
|
+--fipaos.tutorial.emarkets.agent.buyer.BuyerAgent
|
+--fipaos.tutorial.emarkets.agent.buyer.retail.RetailBuyerAgent
- public class RetailBuyerAgent
- extends BuyerAgent
- implements BuyerAbility
The RetailBuyerAgent class represents a retailer that wishes to purchase finished products from a Manufacturer Seller agent
Constructor Summary |
RetailBuyerAgent(String platform_profile, String name, String owner) Constructs a retail buyer agent |
Method Summary |
NegotiationMessage | createProposal(NegotiationMessage cfp_msg) This method creates a proposal to buy components from the Manufacturer Seller agent |
void | initialiseBidEngine() This method initialises the bids engine |
static void | main(String[] args) A main method to enable the agent to be run from the command line. |
synchronized void | shutdown() Attempts to unsubscribe from the market manager before shutting down the agent |
Methods inherited from class fipaos.tutorial.emarkets.agent.buyer.BuyerAgent |
dealWithEscrowProtocolFailure, dealWithEscrowProtocolInform, dealWithFIPASubscribeInform, dealWithFIPASubscribeRefuse, dealWithNegotiationProtocolAcceptProposal, dealWithNegotiationProtocolCfp, dealWithNegotiationProtocolInform, dealWithNegotiationProtocolRejectProposal, dealWithNegotiationProtocolStart, doneEscrowProtocolInitiatorHandlerTask, getCredits, getItems, getTargetItems, GUIClosed |
Methods inherited from class fipaos.agent.FIPAOSAgent |
activate, forward, forward, getAID, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, sendNotUnderstood, sendNotUnderstood, setMessageSender, waitForPushLock |
RetailBuyerAgent
public RetailBuyerAgent(String platform_profile, String name, String owner)
- Constructs a retail buyer agent
- Parameters:
- platform_profile - The location of the platform profile
- name - The agent name
- owner - The owner of this agent
createProposal
public NegotiationMessage createProposal(NegotiationMessage cfp_msg)
- This method creates a proposal to buy components from the Manufacturer Seller agent
- Parameters:
- cfp_msg - The call for proposals from the Manufacturer Seller agent. This contains the number of items
being offered to this buyer and the price per item.
- Returns: A NegotiationMessage that contains the proposal to buy components from the Manufacturer Seller Agent
initialiseBidEngine
public void initialiseBidEngine()
- This method initialises the bids engine
main
public static void main(String[] args)
- A main method to enable the agent to be run from the command line.
The agent takes two command line parameters - the platform profile location,
which is set up by the SetupFIPAOS.bat file to be in the system variable %PLATFORM%,
and the agent name.
- Parameters:
- args.
args[0] - = location of platform.profile
args[1] = name to assign to this agent
shutdown
public synchronized void shutdown()
- Attempts to unsubscribe from the market manager before shutting down the agent
to Class fipaos.tutorial.emarkets.agent.buyer.bid.BidEngine- Reference to the BidsEngine interface. This variable can be instantiated with any object which implements the BidEngine interface