|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Thread Sim_entity GridSimCore GridSim AuctionObserver
public class AuctionObserver
This class is used by entities that want to participate as bidders in auctions.
To use this class, you need to redirect the events that
the entity cannot treat. You need to call
processEvent(Sim_event)
passing the event that
the entity is not able to process. If the event is related
to the auctions (ie. has a tag code corresponding to an auction event)
the observer is able to process it by passing the message
to its Responder.
Responder
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected Sim_port |
outputPort
The Bidder output port. |
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 | |
---|---|
AuctionObserver(int bidderID,
String entityName,
Sim_port port)
Constructor |
|
AuctionObserver(int bidderID,
String entityName,
Sim_port port,
Responder responder)
Constructor |
Method Summary | |
---|---|
void |
body()
|
Responder |
getResponder()
Returns the responder that the observer is using |
boolean |
processEvent(Sim_event ev)
Process an event. |
boolean |
setResponder(Responder responder)
Sets a responder to this observer |
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 |
Field Detail |
---|
protected Sim_port outputPort
Constructor Detail |
---|
public AuctionObserver(int bidderID, String entityName, Sim_port port) throws Exception
bidderID
- the bidder if, since it sends messages on the bidder's behalfentityName
- a name for this entityport
- the port to be used as output of messages
Exception
public AuctionObserver(int bidderID, String entityName, Sim_port port, Responder responder) throws Exception
bidderID
- the bidder if, since it sends messages on the bidder's behalfentityName
- entityName a name for this entityresponder
- the responder which will deal with the messages
that this responder receivesport
- the port to be used as output of messages
Exception
Method Detail |
---|
public boolean setResponder(Responder responder)
responder
- the responder
public Responder getResponder()
public void body()
body
in class Sim_entity
public boolean processEvent(Sim_event ev)
ev
-
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |