|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.liv.auction.core.AbstractAuctioneer
An abstract class representing an auctioneer managing shouts in an auction. Different auction rules should be encapsulated in different Auctioneer classes.
| Field Summary | |
protected Auction |
auction
The auction container for this auctioneer. |
protected MarketQuote |
currentQuote
The current quote |
protected ShoutEngine |
shoutEngine
The shout engine for this auction. |
| Constructor Summary | |
AbstractAuctioneer()
|
|
AbstractAuctioneer(Auction auction)
|
|
| Method Summary | |
java.util.Iterator |
askIterator()
|
java.util.Iterator |
bidIterator()
|
void |
endOfDayProcessing()
|
abstract void |
generateQuote()
|
Auction |
getAuction()
Find out which auction we are the auctioneer for. |
MarketQuote |
getQuote()
|
protected void |
initialise()
|
protected void |
newAsk(Shout ask)
Default rules for handling a new ask. |
protected void |
newBid(Shout bid)
Default rules for handling a new bid. |
void |
newShout(Shout shout)
Code for handling a new shout in the auction. |
void |
printState()
Log the current state of the auction. |
java.lang.Object |
protoClone()
|
void |
removeShout(Shout shout)
Handle a request to retract a shout. |
void |
reset()
Reinitialise our state to the original settings. |
void |
setAuction(Auction auction)
Specify which auction we are the auctioneer for. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uk.ac.liv.auction.core.Auctioneer |
clear, endOfAuctionProcessing, endOfRoundProcessing, shoutsVisible |
| Field Detail |
protected Auction auction
protected ShoutEngine shoutEngine
protected MarketQuote currentQuote
| Constructor Detail |
public AbstractAuctioneer()
public AbstractAuctioneer(Auction auction)
| Method Detail |
public java.lang.Object protoClone()
protoClone in interface Prototypeable
public void newShout(Shout shout)
throws IllegalShoutException
newShout in interface Auctioneershout - The new shout to be processed
IllegalShoutException - Thrown if the shout is invalid in some way.public void removeShout(Shout shout)
removeShout in interface Auctioneerpublic void printState()
printState in interface Auctioneerpublic void reset()
Resetable
reset in interface Resetableprotected void initialise()
public MarketQuote getQuote()
getQuote in interface QuoteProviderpublic java.util.Iterator askIterator()
askIterator in interface Auctioneerpublic java.util.Iterator bidIterator()
bidIterator in interface Auctioneerpublic abstract void generateQuote()
protected void newAsk(Shout ask)
throws DuplicateShoutException
ask - The new ask (offer to sell) to process
DuplicateShoutException
protected void newBid(Shout bid)
throws DuplicateShoutException
bid - The new bid (offer to buy) to process
DuplicateShoutExceptionpublic void setAuction(Auction auction)
Auctioneer
setAuction in interface Auctioneerpublic Auction getAuction()
Auctioneer
getAuction in interface Auctioneerpublic void endOfDayProcessing()
endOfDayProcessing in interface Auctioneer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||