Enum ApplicationState
- java.lang.Object
-
- java.lang.Enum<ApplicationState>
-
- org.gcube.smartgears.lifecycle.application.ApplicationState
-
- All Implemented Interfaces:
Serializable,Comparable<ApplicationState>,State<ApplicationState>
public enum ApplicationState extends Enum<ApplicationState> implements State<ApplicationState>
The state and state transitions of the lifecycle of an application managed as a gCube service.- Author:
- Fabio Simeoni
-
-
Enum Constant Summary
Enum Constants Enum Constant Description activeThe state of applications that have completed initialisation and can accept client requests.failedThe permanent state of applications that has encountered some fatal failure and can no longer accept requests.startedThe state of applications that are in the process of initialisation.stoppedThe state of applications that have can no longer accept requests, even though they may in the future.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringevent()Returns the event corresponding to this state.static ApplicationStatevalueOf(String name)Returns the enum constant of this type with the specified name.static ApplicationState[]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 interface org.gcube.smartgears.lifecycle.State
next, remoteForm
-
-
-
-
Enum Constant Detail
-
started
public static final ApplicationState started
The state of applications that are in the process of initialisation.
-
active
public static final ApplicationState active
The state of applications that have completed initialisation and can accept client requests.
-
stopped
public static final ApplicationState stopped
The state of applications that have can no longer accept requests, even though they may in the future.
-
failed
public static final ApplicationState failed
The permanent state of applications that has encountered some fatal failure and can no longer accept requests.
-
-
Method Detail
-
values
public static ApplicationState[] 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 (ApplicationState c : ApplicationState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ApplicationState 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 nameNullPointerException- if the argument is null
-
event
public String event()
Description copied from interface:StateReturns the event corresponding to this state.- Specified by:
eventin interfaceState<ApplicationState>- Returns:
- the
-
-