Package com.orchestranetworks.scheduler

# Interface ScheduledExecutionContext

public interface ScheduledExecutionContext
Context of a scheduled task execution.

See Also:
  - `ScheduledTask.execute(ScheduledExecutionContext)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addExecutionInformation(String anInformation)`
  Adds an entry to the execution information report.
  `Repository`
  `getRepository()`
  Returns the EBX® repository.
  `Session`
  `getSession()`
  Returns the session associated with this execution.
  `Date`
  `getStartDate()`
  Returns the start date of the scheduled task execution.
  `String`
  `getTaskName()`
  Returns the name of the `ScheduledTask`.
  `void`
  `handleExecutionState()`
  Invoking this method gives the opportunity to intercept pauses, resumes, and interrupts requested from EBX® administration.
  `void`
  `setExecutionInformation(String aReport)`
  Defines the execution information.

- ## 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:

    - `ScheduledTask.isInterruptable()`
    - `ScheduledTask.isPausable()`
    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.