org.dasein.cloud.services.server
Enum ServerState

java.lang.Object
  extended by java.lang.Enum<ServerState>
      extended by org.dasein.cloud.services.server.ServerState
All Implemented Interfaces:
Serializable, Comparable<ServerState>

public enum ServerState
extends Enum<ServerState>

The various possible states in which a server can exist. Implementors should do their best to map cloud-specific states to these states.

Author:
George Reese @ enStratus (http://www.enstratus.com)

Enum Constant Summary
PAUSED
          The server is paused and not currently running or scheduled to run.
PENDING
          A request has been made to launch the server, but it is not currently fully operational.
REBOOTING
          The server is currently in the middle of a reboot and should be operational shortly.
RUNNING
          The server is fully operational as far as we know.
STOPPING
          The server is currentlyin the middle of being terminated and should not be expected to be available ever again.
TERMINATED
          The server has been terminated and is thus entirely useless and all state information is lost.
 
Method Summary
static ServerState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ServerState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PAUSED

public static final ServerState PAUSED
The server is paused and not currently running or scheduled to run.


PENDING

public static final ServerState PENDING
A request has been made to launch the server, but it is not currently fully operational.


RUNNING

public static final ServerState RUNNING
The server is fully operational as far as we know.


REBOOTING

public static final ServerState REBOOTING
The server is currently in the middle of a reboot and should be operational shortly.


STOPPING

public static final ServerState STOPPING
The server is currentlyin the middle of being terminated and should not be expected to be available ever again.


TERMINATED

public static final ServerState TERMINATED
The server has been terminated and is thus entirely useless and all state information is lost.

Method Detail

values

public static ServerState[] 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 (ServerState c : ServerState.values())
    System.out.println(c);

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

valueOf

public static ServerState 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