net.sourceforge.jasa.market.auctioneer
Class GenericAuctioneer
java.lang.Object
net.sourceforge.jasa.market.auctioneer.AbstractAuctioneer
net.sourceforge.jasa.market.auctioneer.TransparentAuctioneer
net.sourceforge.jasa.market.auctioneer.GenericAuctioneer
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Observer, MarketEventListener, Auctioneer, QuoteProvider
public class GenericAuctioneer
- extends TransparentAuctioneer
- implements java.io.Serializable, java.util.Observer
An modular auctioneer for a double market.
- See Also:
- Serialized Form
-
-
Methods inherited from class net.sourceforge.jasa.market.auctioneer.AbstractAuctioneer |
askIterator, askQuote, bidIterator, bidQuote, clear, clear, clear, determineClearingPrice, getClearingPolicy, getClearingQuote, getMarket, getOrderBook, getPricingPolicy, getQuote, getUnmatchedAsks, getUnmatchedBids, newOrder, onEndOfDay, printState, protoClone, removeOrder, setClearingPolicy, setClearingQuote, setMarket, setOrderBook, setPricingPolicy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
account
protected ZeroFundsAccount account
clearingCondition
protected MarketClearingCondition clearingCondition
acceptingPolicy
protected OrderAcceptancePolicy acceptingPolicy
GenericAuctioneer
public GenericAuctioneer()
GenericAuctioneer
public GenericAuctioneer(Market auction)
initialise
protected void initialise()
- Overrides:
initialise
in class AbstractAuctioneer
reset
public void reset()
- Overrides:
reset
in class TransparentAuctioneer
setClearingCondition
public void setClearingCondition(MarketClearingCondition clearingCondition)
getClearingCondition
public MarketClearingCondition getClearingCondition()
setAcceptingPolicy
public void setAcceptingPolicy(OrderAcceptancePolicy acceptingPolicy)
getAcceptingPolicy
public OrderAcceptancePolicy getAcceptingPolicy()
getAccount
public Account getAccount()
- Description copied from interface:
Auctioneer
- Get the account which holds any budget surplus or deficit for the
auctioneer. This is useful when implementing non-budget-balanced
mechanisms.
- Specified by:
getAccount
in interface Auctioneer
clearMarket
protected void clearMarket()
generateQuote
public void generateQuote()
- Specified by:
generateQuote
in class AbstractAuctioneer
checkShoutValidity
protected void checkShoutValidity(Order shout)
throws IllegalOrderException
- Overrides:
checkShoutValidity
in class AbstractAuctioneer
- Parameters:
shout
- The new shout to be processed
- Throws:
IllegalOrderException
- Thrown if the shout is invalid in some way.
update
public void update(java.util.Observable source,
java.lang.Object arg)
- Specified by:
update
in interface java.util.Observer
eventOccurred
public void eventOccurred(MarketEvent event)
- TODO: temporarily put here, clearingCondition and acceptingPolicy should
listen to the market directly
- Overrides:
eventOccurred
in class AbstractAuctioneer
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractAuctioneer