org.oddjob.state
Interface State

All Known Implementing Classes:
ClientDestroyed, JobState, ParentState, ServiceState

public interface State

The state of a Stateful job. Oddjob uses the set of conditions of a state to decide what actions to allow and also what state to reflect up the hierarchy.

Author:
rob

Method Summary
 boolean isComplete()
          Is a job or service complete?
 boolean isDestroyed()
          The job is destroyed.
 boolean isDone()
          Has the work of the job been done? A Job will be JobState.COMPLETE or a service ServiceState.STARTED Used by CascadeJob to see if a jobs immediate sibling can be executed.
 boolean isException()
          Is a job in an exception state.
 boolean isIncomplete()
          Is a job or service incomplete.
 boolean isReady()
          Is a job ready to be executed.
 boolean isStoppable()
          Can a job be stopped? This is a catch all for jobs that are active or executing.
 

Method Detail

isReady

boolean isReady()
Is a job ready to be executed.

Returns:
true/false.

isStoppable

boolean isStoppable()
Can a job be stopped? This is a catch all for jobs that are active or executing.

Returns:
true/false.

isDone

boolean isDone()
Has the work of the job been done? A Job will be JobState.COMPLETE or a service ServiceState.STARTED Used by CascadeJob to see if a jobs immediate sibling can be executed.

Returns:
true/false;

isComplete

boolean isComplete()
Is a job or service complete?

Returns:
true/false.

isIncomplete

boolean isIncomplete()
Is a job or service incomplete. The implication of incomplete is that it could be retried to be complete at some future date.

Returns:
true/false.

isException

boolean isException()
Is a job in an exception state. This is generally due to an unexpected error, as opposed to incomplete which in some way is expected.

Returns:
true/false.

isDestroyed

boolean isDestroyed()
The job is destroyed. It is no longer available for anything.

Returns:
true/false.