|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectThread
Sim_entity
GridSimCore
GridSim
Auctioneer
public abstract class Auctioneer
This class defines the basic behavious of an auctioneer
GridSim| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class GridSim |
|---|
GRIDSIM_VERSION_STRING, PAUSE |
| Fields inherited from class GridSimCore |
|---|
input, NETWORK_TYPE, output |
| Fields inherited from class Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
Auctioneer(String name)
Constructor |
|
Auctioneer(String name,
double baudRate)
Constructor |
|
Auctioneer(String name,
Link link)
|
|
| Method Summary | |
|---|---|
void |
addAuction(Auction auction)
Adds an auction to this auctioneer |
void |
body()
Handles external events that are coming to this Auctioneer entity. |
protected abstract void |
onAuctionClose(Auction auction)
This method should be implemented to perform some auction after some auction has been finished. |
protected abstract void |
onResponseToAsk(MessageAsk ask,
MessageBid bid,
double price)
This method is called when a match for an ask was found by a double auction. |
protected void |
processOtherEvent(Sim_event ev)
Overrides this method when making a new and different type of auctioneer. |
void |
startAuction(int auctionID)
Starts a given auction already added to the auctioneer |
| Methods inherited from class GridSimCore |
|---|
finalizeGridSimulation, getLink, getPingResult, isNetworked, ping, ping, ping, ping, pingBlockingCall, pingBlockingCall, pingBlockingCall, pingBlockingCall, send, send, send, send, send, send, setBackgroundTraffic, setBackgroundTraffic, terminateIOEntities |
| Methods inherited from class Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Auctioneer(String name)
throws Exception
name -
Exception
public Auctioneer(String name,
double baudRate)
throws Exception
name - baudRate -
Exception
public Auctioneer(String name,
Link link)
throws Exception
name - link -
Exception| Method Detail |
|---|
public void addAuction(Auction auction)
auction - public void startAuction(int auctionID)
auctionID - The auction's idpublic void body()
The services or tags available for this resource are:
AuctionTags.AUCTION_POST AuctionTags.AUCTION_START AuctionTags.AUCTION_DELETE AuctionTags.AUCTION_PROPOSE AuctionTags.AUCTION_REJECT_CALL_FOR_BID AuctionTags.AUCTION_ASK AuctionTags.AUCTION_MATCH_TO_ASK processOtherEvent(Sim_event) method
body in class Sim_entityprotected void processOtherEvent(Sim_event ev)
body() for incoming unknown tags.
ev - a Sim_event objectprotected abstract void onAuctionClose(Auction auction)
auction - is the auction that has been concluded
protected abstract void onResponseToAsk(MessageAsk ask,
MessageBid bid,
double price)
ask - the ask previously sent to the auctioneerbid - the bid that matches the askprice - the price used to trade
|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||