Package org.oddjob.state
Interface State
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ClientDestroyed,EventState,GenericState,JobState,ParentState,ServiceState,TaskState,TimerState
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
Modifier and TypeMethodDescriptionbooleanIs a job or service complete?booleanThe job is destroyed.booleanIs a job in an exception state.booleanIs the job executing.booleanIs a job or service incomplete.booleanisReady()Is a job ready to be executed.booleanCan a job be stopped? This is a catch all for jobs that are active or executing.
-
Method Details
-
isReady
boolean isReady()Is a job ready to be executed.- Returns:
- true/false.
-
isExecuting
boolean isExecuting()Is the job executing. This is normally when the thread of execution is still within the job.- 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.
-
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.
-