ocean.negotiation
Class BuyersAgent

java.lang.Object
  |
  +--ocean.negotiation.BuyersAgent
All Implemented Interfaces:
Agent

public class BuyersAgent
extends java.lang.Object
implements Agent

Implementation of the Agent interface that submits a BidList to an Auction.


Constructor Summary
BuyersAgent()
           
 
Method Summary
 OCEANDoc createOCEANDoc(java.lang.String docContent)
          Create a trade proposal document from string content.
protected  BidList FormTradeProposals(OCEANDoc doc)
          Form a BidList from a trade proposal document.
 void setWriter(OCEANWriter ow)
          Set the OCEANWriter of the agent, for writing output to log files.
 void SubmitProposalToAuction(Auction auc, OCEANDoc doc, long to)
          Submit trade proposals in a proposal document to an auction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuyersAgent

public BuyersAgent()
Method Detail

setWriter

public void setWriter(OCEANWriter ow)
Description copied from interface: Agent
Set the OCEANWriter of the agent, for writing output to log files.
Specified by:
setWriter in interface Agent

FormTradeProposals

protected BidList FormTradeProposals(OCEANDoc doc)
Form a BidList from a trade proposal document.
Parameters:
the - document to parse.
Returns:
a new list of bids.

createOCEANDoc

public OCEANDoc createOCEANDoc(java.lang.String docContent)
Create a trade proposal document from string content.
Specified by:
createOCEANDoc in interface Agent
Parameters:
the - content of the document.
Returns:
a newly created proposal document.

SubmitProposalToAuction

public void SubmitProposalToAuction(Auction auc,
                                    OCEANDoc doc,
                                    long to)
Submit trade proposals in a proposal document to an auction.
Specified by:
SubmitProposalToAuction in interface Agent
Parameters:
auc - the auction to which proposals are submitted
doc - the proposal document
to - timeout for the proposals