org.oddjob.state
Enum ParentState

java.lang.Object
  extended by java.lang.Enum<ParentState>
      extended by org.oddjob.state.ParentState
All Implemented Interfaces:
Serializable, Comparable<ParentState>, State

public enum ParentState
extends Enum<ParentState>
implements State

Encapsulate the allowed states for a Structural.

Author:
Rob Gordon

Enum Constant Summary
ACTIVE
          Indicates that child jobs are active.
COMPLETE
          Indicates job has completed.
DESTROYED
          The job has been destroyed.
EXCEPTION
          Indicates an exception has occurred.
EXECUTING
          Indicates the job is executing, which normally means it's in the process of executing it's children.
INCOMPLETE
          Indicates the job is not complete.
READY
          The job is ready to be executing.
STARTED
          Indicates that child jobs are active.
 
Method Summary
static ParentState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ParentState[] 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 class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.oddjob.state.State
isComplete, isDestroyed, isDone, isException, isIncomplete, isReady, isStoppable
 

Enum Constant Detail

READY

public static final ParentState READY
The job is ready to be executing. The Oddjob Framework will only execute a job which is in this state.


EXECUTING

public static final ParentState EXECUTING
Indicates the job is executing, which normally means it's in the process of executing it's children.


ACTIVE

public static final ParentState ACTIVE
Indicates that child jobs are active. This will be the case when the execution thread has passed on but a child job is still active or executing.


STARTED

public static final ParentState STARTED
Indicates that child jobs are active. This will be the case when the execution thread has passed on but a child job is still active or executing.


INCOMPLETE

public static final ParentState INCOMPLETE
Indicates the job is not complete. This will typically be the case when one or more child jobs are INCOMPLETE, but this depends on the nature of the Structural job and the StateOperator it uses.


COMPLETE

public static final ParentState COMPLETE
Indicates job has completed. The will typically be the case when all child jobs have completed, but this depends on the nature of the Structural job and the StateOperator it uses.


EXCEPTION

public static final ParentState EXCEPTION
Indicates an exception has occurred. This will typically be the case when one of a jobs child jobs is in an EXCEPTION state, but this depends on the nature of the Structural job and the StateOperator it uses.


DESTROYED

public static final ParentState DESTROYED
The job has been destroyed. It can no longer be used.

Method Detail

values

public static ParentState[] 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 (ParentState c : ParentState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ParentState 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 name
NullPointerException - if the argument is null