|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Auctioneer
Classes implementing this interface define the rules for matching orders in the marketplace and producing the resulting transaction set.

| Method Summary | |
|---|---|
java.util.Iterator<Order> |
askIterator()
|
java.util.Iterator<Order> |
bidIterator()
|
void |
clear()
Perform the clearing operation for the market; match buyers with sellers and inform the market of any deals. |
Account |
getAccount()
Get the account which holds any budget surplus or deficit for the auctioneer. |
Order |
getLastAsk()
|
Order |
getLastBid()
|
Order |
getLastShout()
|
Market |
getMarket()
Find out which market we are the auctioneer for. |
java.util.List<Order> |
getUnmatchedAsks()
|
java.util.List<Order> |
getUnmatchedBids()
|
void |
newOrder(Order order)
Code for handling a new order in the market. |
boolean |
orderFilled(Order order)
|
void |
printState()
Log the current state of the market. |
void |
removeOrder(Order order)
Cancel an existing order. |
void |
setMarket(Market auction)
Specify which market we are the auctioneer for. |
boolean |
shoutsVisible()
Return true if the shouts of others are visible. |
boolean |
transactionsOccurred()
|
| Methods inherited from interface net.sourceforge.jasa.market.QuoteProvider |
|---|
getQuote |
| Method Detail |
|---|
void clear()
void newOrder(Order order)
throws IllegalOrderException
order - The new shout to be processed
IllegalOrderException - Thrown if the order is invalid in some way.void removeOrder(Order order)
void printState()
void setMarket(Market auction)
Market getMarket()
java.util.Iterator<Order> askIterator()
java.util.Iterator<Order> bidIterator()
boolean shoutsVisible()
boolean orderFilled(Order order)
throws ShoutsNotVisibleException
ShoutsNotVisibleException
boolean transactionsOccurred()
throws ShoutsNotVisibleException
ShoutsNotVisibleException
Order getLastAsk()
throws ShoutsNotVisibleException
ShoutsNotVisibleException
Order getLastBid()
throws ShoutsNotVisibleException
ShoutsNotVisibleException
Order getLastShout()
throws ShoutsNotVisibleException
ShoutsNotVisibleExceptionAccount getAccount()
java.util.List<Order> getUnmatchedBids()
java.util.List<Order> getUnmatchedAsks()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||