|
GridSim v4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectThread
eduni.simjava.Sim_entity
gridsim.GridSimCore
gridsim.GridSim
gridsim.auction.Auctioneer
This class defines the basic behavious of an auctioneer
GridSim| Field Summary |
| Fields inherited from class gridsim.GridSim |
PAUSE, rand, SimulationStartDate |
| Fields inherited from class gridsim.GridSimCore |
input, output |
| Fields inherited from class eduni.simjava.Sim_entity |
|
| 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 gridsim.GridSimCore |
finalize, finalizeGridSimulation, getLink, getPingResult, isNetworked, IsNetworked, ping, ping, ping, ping, pingBlockingCall, pingBlockingCall, pingBlockingCall, pingBlockingCall, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, setBackgroundTraffic, setBackgroundTraffic, TerminateInputOutputEntities, terminateIOEntities |
| Methods inherited from class eduni.simjava.Sim_entity |
add_generator, add_param, add_port, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting |
| Methods inherited from class Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class Object |
equals, 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 v4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||