Interface TriggerService
- All Known Implementing Classes:
DefaultTriggerService
public interface TriggerService
Service for trigger handling covering business methods for data manipulation and search methods.
- Since:
- 4.3
- Spring Bean ID:
- triggerService
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(TriggerModel trigger) Executes the assignedJobModelusing the assignedCronJobModelif the next activation time ((@link TriggerModel#getActivationTime()} is less or equal than the current system time.Returns aListof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the current system time.getActiveTriggers(Calendar calendar) Returns aListof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the specified calendar date.getNextTime(TriggerModel trigger, Calendar relativeTo) Returns the next activation time for theTriggerModelin relation to the specified calendar.intReturns a time interval at which trigger activation is fired.voidsetPulseSeconds(int interval) Sets a time interval at which trigger activation is fired.
-
Method Details
-
activate
Executes the assignedJobModelusing the assignedCronJobModelif the next activation time ((@link TriggerModel#getActivationTime()} is less or equal than the current system time.- Parameters:
trigger- the trigger instance
-
getNextTime
Returns the next activation time for theTriggerModelin relation to the specified calendar.Use this method e.g. for different first day of week modes.
- Parameters:
trigger- the trigger instancerelativeTo- the calendar which the next activation time should be calculated relatively for- Returns:
- the next activation time(
Calendar) for theTriggerModelin relation to the specified time
-
getActiveTriggers
List<TriggerModel> getActiveTriggers()Returns aListof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the current system time.- Returns:
- a
Listof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)is smaller than current system time
-
getActiveTriggers
Returns aListof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the specified calendar date.- Parameters:
calendar- the calendar- Returns:
- a
Listof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the specified calendar date
-
getPulseSeconds
int getPulseSeconds()Returns a time interval at which trigger activation is fired. See cronjob.trigger.interval' property -
setPulseSeconds
void setPulseSeconds(int interval) Sets a time interval at which trigger activation is fired. See cronjob.trigger.interval' property .
-