Interface Scheduler

All Known Implementing Classes:
WorkflowScheduler

public interface Scheduler
This interface is used to implement a Scheduler managed by the SchedulerService.
Version:
1.0
Author:
rsoika
See Also:
  • Field Details

  • Method Details

    • run

      The run method is called by the ScheduelrService during a timer timeout event. The SchedulerService provides a configuration object containing information for the processor of a concrete implementation:
      • type - fixed to value 'scheduler'
      • _scheduler_definition - the chron/calendar definition for the Java EE timer service.
      • _scheduler_enabled - boolean indicates if the scheduler is enabled/disabled
      • _scheduler_class - class name of the scheduler implementation
      • _scheduler_log - optional log information generated by the scheduler implementation
      Beside these standard attributes a scheduler configuration can contain additional application specific information.

      After the run method is finished the scheduelrService will save the scheduler configuration if a configuration object is returned. In case of an exception the Timer service will be canceled. To cancel the timer programmatically, an implementation must set the item _scheduler_enabled to 'false'.

      To start or stop the timer service the methods start() and stop() from the SchedulerService can be called.

      Parameters:
      scheduler - the scheduler configuration
      Returns:
      updated scheduler configuration
      Throws:
      SchedulerException