uk.ac.liv.auction.agent
Interface TradingAgent

All Superinterfaces:
AuctionEventListener, Resetable
All Known Implementing Classes:
AbstractTradingAgent

public interface TradingAgent
extends Resetable, AuctionEventListener

Classes implementing this interface can trade in round-robin auctions, as implemented by the RoundRobinAuction class.

Version:
$Revision: 1.2 $
Author:
Steve Phelps

Method Summary
 void informOfBuyer(Auction auction, TradingAgent buyer, double price, int quantity)
          This method is used by a buyer to notify a seller that one of its bids has been successful.
 void informOfSeller(Auction auction, Shout winningShout, TradingAgent seller, double price, int quantity)
          This method is used by an auction to notify a buyer that one of its bids has been successful.
 boolean isBuyer()
           
 boolean isSeller()
           
 void requestShout(Auction auction)
          Request a shout from this trader.
 
Methods inherited from interface uk.ac.liv.util.Resetable
reset
 
Methods inherited from interface uk.ac.liv.auction.core.AuctionEventListener
eventOccurred
 

Method Detail

requestShout

public void requestShout(Auction auction)
Request a shout from this trader. The trader will perform any bidding activity in this method and return when it is done. An auction invokes this method on a trader when it is the traders "turn" to bid in that auction.

Parameters:
auction - The auction in which to trade

isBuyer

public boolean isBuyer()

isSeller

public boolean isSeller()

informOfSeller

public void informOfSeller(Auction auction,
                           Shout winningShout,
                           TradingAgent seller,
                           double price,
                           int quantity)
This method is used by an auction to notify a buyer that one of its bids has been successful.

Parameters:
seller - The seller whose ask has been matched
price - The price of the goods as determined by the auction

informOfBuyer

public void informOfBuyer(Auction auction,
                          TradingAgent buyer,
                          double price,
                          int quantity)
This method is used by a buyer to notify a seller that one of its bids has been successful.