Enum Class StateConditions

java.lang.Object
java.lang.Enum<StateConditions>
org.oddjob.state.StateConditions
All Implemented Interfaces:
Serializable, Comparable<StateConditions>, Constable, Predicate<State>, StateCondition

public enum StateConditions extends Enum<StateConditions> implements StateCondition
These are drop in replacements for jobs that used to use a JobStates for conditions.
Author:
Rob Gordon
  • Enum Constant Details

    • READY

      public static final StateConditions READY
      Is a job ready?
    • EXECUTING

      public static final StateConditions EXECUTING
    • INCOMPLETE

      public static final StateConditions INCOMPLETE
      Is a job incomplete?
    • COMPLETE

      public static final StateConditions COMPLETE
      Is a job complete?
    • EXCEPTION

      public static final StateConditions EXCEPTION
      Is a job in an exception state?
    • DESTROYED

      public static final StateConditions 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

      public static final StateConditions RUNNING
      Is a job executing or otherwise active?
    • SUCCESS

      public static final StateConditions SUCCESS
      A synonym for COMPLETE.
    • FAILURE

      public static final StateConditions FAILURE
      The state is either INCOMPLETE or EXCEPTION
    • NOT_INCOMPLETE

      public static final StateConditions NOT_INCOMPLETE
      The state is either COMPLETE or EXCEPTION.
    • DONE

      public static final StateConditions DONE
      Like COMPLETE but also stopped. Applicable to services which are complete when started.
    • FINISHED

      public static final StateConditions FINISHED
      The state is either COMPLETE, INCOMPLETE or EXCEPTION
    • ENDED

      public static final StateConditions ENDED
      Like FINISHED but also stopped. Applicable to services which are complete when started.
    • ACTIVE

      public static final StateConditions 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

      public static final StateConditions LIVE
      A job that is stoppable but not executing. Includes active and started jobs.
    • STARTED

      public static final StateConditions STARTED
      Something, generally a service, has STARTED when it is both complete and stoppable.
    • ANY

      public static final StateConditions ANY
      Always true.
    • NONE

      public static final StateConditions NONE
      Always false.
  • Method Details

    • values

      public static StateConditions[] 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

      public static StateConditions valueOf(String name)
      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 name
      NullPointerException - if the argument is null