GridSim 5.0 beta

gridsim.parallel.reservation
Enum MessageType

Object
  extended by Enum<MessageType>
      extended by MessageType
All Implemented Interfaces:
Serializable, Comparable<MessageType>

public enum MessageType
extends Enum<MessageType>

Enumerator with the types of reservation messages.

Since:
5.0
Author:
Marcos Dias de Assuncao
See Also:
ReservationMessage

Enum Constant Summary
CANCEL
          Cancels an existing reservation.
COMMIT
          Commits a reservation previously made.
CREATE
          Requests for a new reservation.
LIST_FREE_TIME
          Requests a list of free or empty time of a resource.
MODIFY
          Modifies an existing reservation.
STATUS
          Queries the current status of a reservation.
UNKNOWN
          Message of unknown type.
 
Method Summary
 String getDescription()
          Returns a description of the type
 int intValue()
          Returns integer value associated with this message type
static MessageType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessageType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final MessageType UNKNOWN
Message of unknown type.


CREATE

public static final MessageType CREATE
Requests for a new reservation.


CANCEL

public static final MessageType CANCEL
Cancels an existing reservation.


MODIFY

public static final MessageType MODIFY
Modifies an existing reservation.


STATUS

public static final MessageType STATUS
Queries the current status of a reservation.


COMMIT

public static final MessageType COMMIT
Commits a reservation previously made.


LIST_FREE_TIME

public static final MessageType LIST_FREE_TIME
Requests a list of free or empty time of a resource.

Method Detail

values

public static MessageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MessageType c : MessageType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MessageType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

intValue

public int intValue()
Returns integer value associated with this message type

Returns:
integer value associated with this message type

getDescription

public String getDescription()
Returns a description of the type

Returns:
a string representation of the type

GridSim 5.0 beta

The University of Melbourne, Australia, 2009