|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Auctioneer
An interface representing an auctioneer managing shouts in an auction. Different auction rules should be encapsulated in different Auctioneer classes.
An auctioneer is configured with:
ShoutAcceptingPolicy
: regulats what shouts are acceptable;MarketClearingCondition
: defines when the market is cleared,
trying to match asks and bids;PricingPolicy
: determines prices in transactions between matching
asks and bids;ChargingPolicy
: tells how much the auctioneer charges;
Method Summary | ||
---|---|---|
java.util.Iterator<Shout> |
askIterator()
|
|
double |
askQuote()
|
|
java.util.Iterator<Shout> |
bidIterator()
|
|
double |
bidQuote()
|
|
void |
clear()
Perform the clearing operation for the auction; match buyers with sellers and inform the auction of any deals. |
|
ShoutAcceptingPolicy |
getAcceptingPolicy()
|
|
ChargingPolicy |
getChargingPolicy()
|
|
MarketClearingCondition |
getClearingCondition()
|
|
|
getHelper(java.lang.Class<H> type)
|
|
java.lang.String |
getName()
|
|
PricingPolicy |
getPricingPolicy()
|
|
QuotingPolicy |
getQuotingPolicy()
|
|
MarketRegistry |
getRegistry()
|
|
Shout |
getShout(java.lang.String shoutId)
|
|
ShoutEngine |
getShoutEngine()
|
|
SubscribingPolicy |
getSubscribingPolicy()
|
|
void |
newShout(Shout shout)
Code for handling a new shout in the auction. |
|
void |
printState()
Log the current status of the auction. |
|
void |
removeShout(Shout shout)
Handle a request to retract a shout. |
|
|
setHelper(java.lang.Class<H> type,
H helper)
register a Helper , which can be retrieved and used by
AuctioneerPolicy to have additional capabilities that are shared
with other policies. |
|
void |
setName(java.lang.String name)
|
Methods inherited from interface edu.cuny.cat.market.QuoteProvider |
---|
getQuote |
Methods inherited from interface edu.cuny.cat.event.AuctionEventListener |
---|
eventOccurred |
Method Detail |
---|
void clear()
void newShout(Shout shout) throws IllegalShoutException
shout
- The new shout to be processed
IllegalShoutException
- Thrown if the shout is invalid in some way.void removeShout(Shout shout)
Shout getShout(java.lang.String shoutId)
shoutId
- the id of desired shout.
void printState()
java.util.Iterator<Shout> askIterator()
java.util.Iterator<Shout> bidIterator()
double askQuote()
double bidQuote()
ShoutEngine getShoutEngine()
QuotingPolicy getQuotingPolicy()
ChargingPolicy getChargingPolicy()
MarketClearingCondition getClearingCondition()
PricingPolicy getPricingPolicy()
ShoutAcceptingPolicy getAcceptingPolicy()
SubscribingPolicy getSubscribingPolicy()
MarketRegistry getRegistry()
<H extends Helper> H getHelper(java.lang.Class<H> type)
type
- a class or subclass of Helper
<H extends Helper> void setHelper(java.lang.Class<H> type, H helper)
Helper
, which can be retrieved and used by
AuctioneerPolicy
to have additional capabilities that are shared
with other policies.
type
- helper
- java.lang.String getName()
void setName(java.lang.String name)
name
- the name for the auction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |