Interface Scheduler
-
- All Known Implementing Classes:
WorkflowScheduler
public interface SchedulerThis interface is used to implement a Scheduler managed by the SchedulerService.- Version:
- 1.0
- Author:
- rsoika
- See Also:
SchedulerService
-
-
Field Summary
Fields Modifier and Type Field Description static StringITEM_ERRORMESSAGEstatic StringITEM_LOGMESSAGEstatic StringITEM_SCHEDULER_CLASSstatic StringITEM_SCHEDULER_DEFINITIONstatic StringITEM_SCHEDULER_ENABLEDstatic StringITEM_SCHEDULER_NAMEstatic StringITEM_SCHEDULER_STATUS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ItemCollectionrun(ItemCollection job)The run method is called by the ScheduelrService during a timer timeout event.
-
-
-
Field Detail
-
ITEM_SCHEDULER_NAME
static final String ITEM_SCHEDULER_NAME
- See Also:
- Constant Field Values
-
ITEM_SCHEDULER_ENABLED
static final String ITEM_SCHEDULER_ENABLED
- See Also:
- Constant Field Values
-
ITEM_SCHEDULER_STATUS
static final String ITEM_SCHEDULER_STATUS
- See Also:
- Constant Field Values
-
ITEM_SCHEDULER_CLASS
static final String ITEM_SCHEDULER_CLASS
- See Also:
- Constant Field Values
-
ITEM_SCHEDULER_DEFINITION
static final String ITEM_SCHEDULER_DEFINITION
- See Also:
- Constant Field Values
-
ITEM_ERRORMESSAGE
static final String ITEM_ERRORMESSAGE
- See Also:
- Constant Field Values
-
ITEM_LOGMESSAGE
static final String ITEM_LOGMESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
run
ItemCollection run(ItemCollection job) throws SchedulerException
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
-
-