Interface ScheduledExecutionContext


public interface ScheduledExecutionContext
Context of a scheduled task execution.
See Also:
  • Method Details

    • getRepository

      Repository getRepository()
      Returns the EBX® repository.
    • getSession

      Session getSession()
      Returns the session associated with this execution.
    • getTaskName

      String getTaskName()
      Returns the name of the ScheduledTask.
    • getStartDate

      Date getStartDate()
      Returns the start date of the scheduled task execution.
    • handleExecutionState

      void handleExecutionState() throws ScheduledTaskInterruption
      Invoking this method gives the opportunity to intercept pauses, resumes, and interrupts requested from EBX® administration.

      Pause or interrupt requests are only handled if the task permits such actions using the methods:

      Throws:
      ScheduledTaskInterruption - thrown to interrupt the current task, it should not be caught by the client code.
    • addExecutionInformation

      void addExecutionInformation(String anInformation)
      Adds an entry to the execution information report. It is interpreted as an HTML string. Execution information entries are available in the execution reports table, in EBX® administration.

      This method must be used sparingly, since each invocation adds a new element to the aggregated list group persisted in the EBX® repository, and commits it.

    • setExecutionInformation

      void setExecutionInformation(String aReport)
      Defines the execution information. It is interpreted as an HTML string and is made available in the table of execution reports, in EBX® administration.

      First clears the report if it already contains entries.