org.gcube.common.ghn.service.lifecycle
Enum State

java.lang.Object
  extended by java.lang.Enum<State>
      extended by org.gcube.common.ghn.service.lifecycle.State
All Implemented Interfaces:
Serializable, Comparable<State>

public enum State
extends Enum<State>

The state and state transitions of the lifecycle of an application managed as a gCube service.

Author:
Fabio Simeoni

Enum Constant Summary
failed
          The permanent state of services that can no longer accept requests.
ready
          The state of services that have completed initialisation and can accept client requests.
started
          The state of services that are in the process of initialisation.
stopped
          The state of services that have can no longer accept requests, even though they may in the future.
 
Method Summary
abstract  List<State> next()
          Returns the list of states to which services can transition to from this state.
 String remoteForm()
          Returns a serialisation of this state for exchange purposes.
static State valueOf(String name)
          Returns the enum constant of this type with the specified name.
static State[] 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

started

public static final State started
The state of services that are in the process of initialisation.


ready

public static final State ready
The state of services that have completed initialisation and can accept client requests.


stopped

public static final State stopped
The state of services that have can no longer accept requests, even though they may in the future.


failed

public static final State failed
The permanent state of services that can no longer accept requests.

Method Detail

values

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

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

valueOf

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

next

public abstract List<State> next()
Returns the list of states to which services can transition to from this state.

Returns:
the states

remoteForm

public String remoteForm()
Returns a serialisation of this state for exchange purposes.

Returns:


Copyright © 2013. All Rights Reserved.