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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionrun
(ItemCollection job) The run method is called by the ScheduelrService during a timer timeout event.
-
Field Details
-
ITEM_SCHEDULER_NAME
- See Also:
-
ITEM_SCHEDULER_ENABLED
- See Also:
-
ITEM_SCHEDULER_STATUS
- See Also:
-
ITEM_SCHEDULER_CLASS
- See Also:
-
ITEM_SCHEDULER_DEFINITION
- See Also:
-
ITEM_ERRORMESSAGE
- See Also:
-
ITEM_LOGMESSAGE
- See Also:
-
-
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
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
-