Package com.bc.ceres.core.runtime
Enum ModuleState
- java.lang.Object
-
- java.lang.Enum<ModuleState>
-
- com.bc.ceres.core.runtime.ModuleState
-
- All Implemented Interfaces:
Serializable
,Comparable<ModuleState>
public enum ModuleState extends Enum<ModuleState>
A module's state.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVE
The 'active' state.INSTALLED
The 'installed' state.NULL
The 'null' state, which means that the state has not been set.RESOLVED
The 'resolved' state.STARTING
The 'starting' state.STOPPING
The 'stopping' state.UNINSTALLED
The 'uninstalled' state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
boolean
is(ModuleState state)
boolean
isOneOf(ModuleState state0, ModuleState... states)
static ModuleState
valueOf(String name)
Returns the enum constant of this type with the specified name.static ModuleState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTALLED
public static final ModuleState INSTALLED
The 'installed' state.
-
RESOLVED
public static final ModuleState RESOLVED
The 'resolved' state. Implies 'installed'.
-
STARTING
public static final ModuleState STARTING
The 'starting' state. Implies 'resolved'.
-
ACTIVE
public static final ModuleState ACTIVE
The 'active' state. Implies 'resolved'.
-
STOPPING
public static final ModuleState STOPPING
The 'stopping' state. Implies 'resolved'.
-
UNINSTALLED
public static final ModuleState UNINSTALLED
The 'uninstalled' state. Implies 'active' because modules cannot be uninstalled while the runtime is still up and running.
-
NULL
public static final ModuleState NULL
The 'null' state, which means that the state has not been set. Clients will never observe this state.
-
-
Method Detail
-
values
public static ModuleState[] 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 (ModuleState c : ModuleState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModuleState 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
-
getValue
public int getValue()
-
is
public boolean is(ModuleState state)
-
isOneOf
public boolean isOneOf(ModuleState state0, ModuleState... states)
-
-