GridSim 5.0 beta

gridsim.auction
Class MessageCallForBids

Object
  extended by Message
      extended by MessageCallForBids

public class MessageCallForBids
extends Message

This class represents an call for bids sent by the auctioneer

Since:
GridSim Toolkit 4.0
Author:
Marcos Dias de Assuncao
See Also:
AuctionTags

Field Summary
 
Fields inherited from class Message
TO_ALL_BIDDERS
 
Constructor Summary
MessageCallForBids(int auctionID, int protocol, double price, int round)
          Constructor
MessageCallForBids(int auctionID, int protocol, float price)
          Constructor
 
Method Summary
 int getAuctioneer()
          Returns the auctioneer that sent the CFP
 double getPrice()
          Returns the price of the CFP
 int getRound()
          Returns the round the CFP refers to
 boolean setAuctioneer(int auctioneer)
          Sets the auctioneer or source of the CFP
 boolean setPrice(float price)
          Sets the price of the CFP
 String toString()
          Converts message to String
 
Methods inherited from class Message
getAttribute, getAttributes, getAuctionID, getDestinationID, getMessageID, getProtocol, getScheduleTime, getSourceID, scheduleToBeSent, setAttribute, setAttributes, setAuctionID, setDestinationID, setMessageID, setProtocol, setSourceID
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageCallForBids

public MessageCallForBids(int auctionID,
                          int protocol,
                          double price,
                          int round)
Constructor

Parameters:
auctionID - the this CFP belongs to
protocol - the protocol used
price - the price of this CFP
round - the round this CFP refers to

MessageCallForBids

public MessageCallForBids(int auctionID,
                          int protocol,
                          float price)
Constructor

Parameters:
auctionID - the this CFP belongs to
protocol - the protocol used
price - the price of this CFP
Method Detail

setPrice

public boolean setPrice(float price)
Sets the price of the CFP

Parameters:
price - the price
Returns:
true if the price was properly set
Pre Condition:
price >= 0.0

getPrice

public double getPrice()
Returns the price of the CFP

Returns:
the price

getRound

public int getRound()
Returns the round the CFP refers to

Returns:
the round

setAuctioneer

public boolean setAuctioneer(int auctioneer)
Sets the auctioneer or source of the CFP

Parameters:
auctioneer - the auctioneer's ID
Returns:
true if the auctioneer is properly set
Pre Condition:
bidder == some GridSim entity's id

getAuctioneer

public int getAuctioneer()
Returns the auctioneer that sent the CFP

Returns:
the auctioneer's ID

toString

public String toString()
Converts message to String

Overrides:
toString in class Message
Returns:
the string representation of the message

GridSim 5.0 beta

The University of Melbourne, Australia, 2009