|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Message
public class Message
This class represents a single message exchanged among auctioneers, bidders or sellers.
AuctionTags
Field Summary | |
---|---|
static int |
TO_ALL_BIDDERS
This tag is used as destination of messages that are broadcast |
Constructor Summary | |
---|---|
Message(int auctionID,
int protocol)
|
Method Summary | |
---|---|
Object |
getAttribute(Object key)
Returns an attribute of the message. |
protected Hashtable |
getAttributes()
|
int |
getAuctionID()
Retruns the auction ID of this message |
int |
getDestinationID()
Returns the ID of the entity that is the recipient of this message |
int |
getMessageID()
Returns the message ID |
int |
getProtocol()
Returns the auction protocol. |
double |
getScheduleTime()
Returns how much time to waited to schedule the message |
int |
getSourceID()
Returns the ID of the entity that generated the message |
boolean |
scheduleToBeSent(double time)
The message can be scheduled to be sent at a given time. |
boolean |
setAttribute(Object key,
Object value)
Sets an attribute to the message. |
protected void |
setAttributes(Hashtable attrib)
|
boolean |
setAuctionID(int auctionID)
Sets the auction ID of this message |
boolean |
setDestinationID(int id)
Sets the the GridSim entity that is the recipient of this message |
protected boolean |
setMessageID(int id)
Sets the message ID |
boolean |
setProtocol(int protocol)
Sets the auction protocol used this auction |
boolean |
setSourceID(int id)
Sets the the GridSim entity that generates this message |
String |
toString()
Converts message to String |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int TO_ALL_BIDDERS
Constructor Detail |
---|
public Message(int auctionID, int protocol)
auctionID
- protocol
- Method Detail |
---|
public Object getAttribute(Object key)
key
- the key for the attribute to be retireved
public boolean setAttribute(Object key, Object value)
key
- is the key used to retrieve the attribute.value
- is the object that corresponds to the attribute.
protected Hashtable getAttributes()
protected void setAttributes(Hashtable attrib)
public int getMessageID()
protected boolean setMessageID(int id)
id
- the new message ID
public boolean setAuctionID(int auctionID)
auctionID
- the ID of the auction to which the message refers
public int getAuctionID()
public int getProtocol()
public boolean setProtocol(int protocol)
protocol
-
public boolean setSourceID(int id)
id
- the ID of an Gridsim entity
public int getSourceID()
public boolean setDestinationID(int id)
id
- the ID of an Gridsim entity
public int getDestinationID()
public boolean scheduleToBeSent(double time)
time
- the time to wait to send the message
public double getScheduleTime()
public String toString()
toString
in class Object
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |