Interface TriggerService
-
- All Known Implementing Classes:
DefaultTriggerService
public interface TriggerServiceService for trigger handling covering business methods for data manipulation and search methods.- Since:
- 4.3
- Spring Bean ID:
- triggerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivate(TriggerModel trigger)Executes the assignedJobModelusing the assignedCronJobModelif the next activation time ((@link TriggerModel#getActivationTime()} is less or equal than the current system time.java.util.List<TriggerModel>getActiveTriggers()Returns aListof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the current system time.java.util.List<TriggerModel>getActiveTriggers(java.util.Calendar calendar)Returns aListof all Triggers, whose next activation time (getNextTime(TriggerModel, Calendar)lies before the specified calendar date.java.util.CalendargetNextTime(TriggerModel trigger, java.util.Calendar relativeTo)Returns the next activation time for theTriggerModelin relation to the specified calendar.intgetPulseSeconds()Returns a time interval at which trigger activation is fired.voidsetPulseSeconds(int interval)Sets a time interval at which trigger activation is fired.
-
-
-
Method Detail
-
activate
void activate(TriggerModel trigger)
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
java.util.Calendar getNextTime(TriggerModel trigger, java.util.Calendar relativeTo)
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
java.util.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
java.util.List<TriggerModel> getActiveTriggers(java.util.Calendar calendar)
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 .
-
-