Interface State

All Superinterfaces:
Serializable
All Known Implementing Classes:
ClientDestroyed, EventState, GenericState, JobState, ParentState, ServiceState, TaskState, TimerState

public interface State extends Serializable
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 Type
    Method
    Description
    boolean
    Is a job or service complete?
    boolean
    The job is destroyed.
    boolean
    Is a job in an exception state.
    boolean
    Is the job executing.
    boolean
    Is a job or service incomplete.
    boolean
    Is a job ready to be executed.
    boolean
    Can 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.