Package de.dlr.proseo.model.enums
Enum Class FacilityState
- All Implemented Interfaces:
Serializable,Comparable<FacilityState>,Constable
For the user as well as for planning and product access purposes it is important to know, whether a processing facility is
operational or not.
Allowed state transitions are DISABLED <--> STOPPED --> STARTING --> RUNNING --> STOPPING --> STOPPED.
Allowed state transitions are DISABLED <--> STOPPED --> STARTING --> RUNNING --> STOPPING --> STOPPED.
- Author:
- Dr. Thomas Bassler
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe processing facility must not be used.The processing facility is fully available.The processing facility is in the run-up process.The processing facility is temporarily halted.The processing facility is in the process of being stopped. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisLegalTransition(FacilityState other) Check whether the transition to the other state is legalstatic FacilityStateReturns the enum constant of this class with the specified name.static FacilityState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISABLED
The processing facility must not be used. All requests concerning a facility in this state shall return the HTTP code 400 (Bad Request) -
STOPPED
The processing facility is temporarily halted. The facility is available for order planning, but no job steps shall be started, and requests for product ingestion or download shall return the HTTP code 503 (Temporarily Unavailable) immediately. -
STARTING
The processing facility is in the run-up process. The fa- cility is available for order planning, job step starting may be initiated, but may time out, all other requests shall return the HTTP code 503 (Temporarily Unavailable) either immediately or after a reasonable time out period. -
RUNNING
The processing facility is fully available. All requests are allowed. -
STOPPING
The processing facility is in the process of being stopped. No new job steps shall be started, but running job steps are allowed to finish and can be queried. All other requests shall return the HTTP code 503 (Temporarily Unavailable) immediately.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isLegalTransition
Check whether the transition to the other state is legal- Parameters:
other- the state to switch to- Returns:
- true, if the transition is legal, false otherwise
-