Class JobContainer

java.lang.Object
org.knowm.sundial.JobContainer
Direct Known Subclasses:
Job, JobAction

public abstract class JobContainer extends Object
The highest class of the Job hierarchy which contains the ThreadLocal instance, the JobContext, and handles terminating of Jobs.
Author:
timmolter
  • Constructor Details

    • JobContainer

      public JobContainer()
  • Method Details

    • initContextContainer

      protected void initContextContainer(JobExecutionContext jobExecutionContext)
      Initialize the ThreadLocal with a JobExecutionContext object
      Parameters:
      jobExecutionContext -
    • destroyContext

      protected void destroyContext()
      Empty the ThreadLocal container
    • getJobContext

      protected JobContext getJobContext()
      Get the JobContext object
      Returns:
    • checkTerminated

      public void checkTerminated()
      Check if the terminate flag is true, and throw a JobInterruptException if it is.
    • setTerminate

      protected void setTerminate()
      Set the terminate flag to true. Client code should not call this.