Package org.oddjob.state
Enum Class StateConditions
- All Implemented Interfaces:
Serializable,Comparable<StateConditions>,Constable,Predicate<State>,StateCondition
These are drop in replacements for jobs that used to use
a
JobStates for conditions.- Author:
- Rob Gordon
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Conversion from StringNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA job that is active.Always true.Is a job complete?The job has been destroyed.LikeCOMPLETEbut also stopped.LikeFINISHEDbut also stopped.Is a job in an exception state?The state is either INCOMPLETE or EXCEPTIONThe state is either COMPLETE, INCOMPLETE or EXCEPTIONIs a job incomplete?A job that is stoppable but not executing.Always false.The state is either COMPLETE or EXCEPTION.Is a job ready?Is a job executing or otherwise active?Something, generally a service, has STARTED when it is both complete and stoppable.A synonym for COMPLETE. -
Method Summary
Modifier and TypeMethodDescriptionstatic StateConditionsReturns the enum constant of this class with the specified name.static StateConditions[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.oddjob.state.StateCondition
test, test
-
Enum Constant Details
-
READY
Is a job ready? -
EXECUTING
-
INCOMPLETE
Is a job incomplete? -
COMPLETE
Is a job complete? -
EXCEPTION
Is a job in an exception state? -
DESTROYED
The job has been destroyed. It can no longer be used. Note that many Jobs that use state conditions will enter an EXCEPTION state if the job they trigger on is destroyed, and so this state condition will not be met. -
RUNNING
Is a job executing or otherwise active? -
SUCCESS
A synonym for COMPLETE. -
FAILURE
The state is either INCOMPLETE or EXCEPTION -
NOT_INCOMPLETE
The state is either COMPLETE or EXCEPTION. -
DONE
LikeCOMPLETEbut also stopped. Applicable to services which are complete when started. -
FINISHED
The state is either COMPLETE, INCOMPLETE or EXCEPTION -
ENDED
LikeFINISHEDbut also stopped. Applicable to services which are complete when started. -
ACTIVE
A job that is active. Indicates necessary work is still being done asynchronously, as opposed to invalid input: '{@link #STARTED) which indicates necessary work is complete.' -
LIVE
A job that is stoppable but not executing. Includes active and started jobs. -
STARTED
Something, generally a service, has STARTED when it is both complete and stoppable. -
ANY
Always true. -
NONE
Always false.
-
-
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
-