fipaos.tutorial.emarkets.agent.buyer.manufacturer
Class ManufacturerBuyerAgent

fipaos.agent.FIPAOSAgent
  |
  +--fipaos.tutorial.emarkets.agent.SubscribingAgent
        |
        +--fipaos.tutorial.emarkets.agent.buyer.BuyerAgent
              |
              +--fipaos.tutorial.emarkets.agent.buyer.manufacturer.ManufacturerBuyerAgent

public class ManufacturerBuyerAgent
extends BuyerAgent
implements BuyerAbility

The ManufacturerBuyerAgent class represents a manufacturer that purchases finished components from a ComponentSellerAgent


Inner classes inherited from class fipaos.agent.FIPAOSAgent
FIPAOSAgent.TopLevelHandlerTask

Fields inherited from class fipaos.agent.FIPAOSAgent
_registered_with, _state

Constructor Summary
ManufacturerBuyerAgent(String platform_profile, String name, String owner)
          Constructs a ManufacturerBuyerAgent

Method Summary
 NegotiationMessagecreateProposal(NegotiationMessage cfp_msg)
          This method creates a proposal to buy components from the Component Seller agent
 voidinitialiseBidEngine()
          This method initialises the bids engine
 static voidmain(String[] args)
          A main method to enable the agent to be run from the command line.
 synchronized voidshutdown()
          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.tutorial.emarkets.agent.SubscribingAgent
addAgent, doneFIPASubscribeInitiatorHandlerTask, doneFIPASubscribeInitiatorHandlerTask, getSubscribedWith, searchForAgents, subscribe, subscriberGUIClosed, unsubscribe

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

Constructor Detail

ManufacturerBuyerAgent

public ManufacturerBuyerAgent(String platform_profile, String name, String owner)
Constructs a ManufacturerBuyerAgent
Parameters:
platform_profile - The location of the platform profile
name - The agent name
owner - The owner of this agent
Method Detail

createProposal

public NegotiationMessage createProposal(NegotiationMessage cfp_msg)
This method creates a proposal to buy components from the Component Seller agent
Parameters:
cfp_msg - The call for proposals from the Component 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 Component 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

shutdown

public synchronized void shutdown()
Attempts to unsubscribe from the market manager before shutting down the agent

Association Links

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