Package org.frankframework.scheduler
Class SchedulerHelper
java.lang.Object
org.frankframework.scheduler.SchedulerHelper
The SchedulerHelper encapsulates the quarz scheduler.
- Author:
- John Dekker
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected static org.apache.logging.log4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
protected static org.quartz.CronTrigger
createCronTrigger
(org.quartz.TriggerKey triggerKey, String cronExpression) void
deleteTrigger
(String jobName) void
deleteTrigger
(String name, String group) void
deleteTrigger
(IJob jobDef) org.quartz.JobDetail
getJobDetail
(String jobName) org.quartz.JobDetail
getJobDetail
(String jobName, String jobGroup) org.quartz.Scheduler
org.quartz.Trigger
getTrigger
(String name) org.quartz.Trigger
getTrigger
(String name, String group) void
scheduleJob
(IJob jobdef) void
scheduleJob
(org.quartz.JobDetail jobDetail, long interval) Schedule a new jobvoid
scheduleJob
(org.quartz.JobDetail jobDetail, String cronExpression) Schedule a new jobvoid
scheduleJob
(org.quartz.JobDetail jobDetail, String cronExpression, long interval, boolean overwrite) Schedule a new jobvoid
setScheduler
(org.quartz.Scheduler scheduler) void
static void
validateJob
(org.quartz.JobDetail jobDetail, String cronExpression)
-
Field Details
-
log
protected static org.apache.logging.log4j.Logger log -
DEFAULT_GROUP
- See Also:
-
-
Constructor Details
-
SchedulerHelper
public SchedulerHelper()
-
-
Method Details
-
validateJob
public static void validateJob(org.quartz.JobDetail jobDetail, String cronExpression) throws ConfigurationException - Throws:
ConfigurationException
-
scheduleJob
- Throws:
org.quartz.SchedulerException
-
scheduleJob
public void scheduleJob(org.quartz.JobDetail jobDetail, String cronExpression) throws org.quartz.SchedulerException Schedule a new job- Parameters:
jobDetail
-cronExpression
- null or cron expression in quartz format- Throws:
org.quartz.SchedulerException
-
scheduleJob
public void scheduleJob(org.quartz.JobDetail jobDetail, long interval) throws org.quartz.SchedulerException Schedule a new job- Parameters:
jobDetail
-interval
- 0 or interval when to trigger- Throws:
org.quartz.SchedulerException
-
scheduleJob
public void scheduleJob(org.quartz.JobDetail jobDetail, String cronExpression, long interval, boolean overwrite) throws org.quartz.SchedulerException Schedule a new job- Parameters:
jobDetail
-cronExpression
- null or cron expression in quartz formatinterval
- 0 (trigger once) or interval (in ms) when to triggeroverwrite
- overwrite existingjob
- Throws:
org.quartz.SchedulerException
-
createCronTrigger
protected static org.quartz.CronTrigger createCronTrigger(org.quartz.TriggerKey triggerKey, String cronExpression) -
contains
- Throws:
org.quartz.SchedulerException
-
contains
- Throws:
org.quartz.SchedulerException
-
getTrigger
- Throws:
org.quartz.SchedulerException
-
getTrigger
public org.quartz.Trigger getTrigger(String name, String group) throws org.quartz.SchedulerException - Throws:
org.quartz.SchedulerException
-
getJobDetail
- Throws:
org.quartz.SchedulerException
-
getJobDetail
public org.quartz.JobDetail getJobDetail(String jobName, String jobGroup) throws org.quartz.SchedulerException - Throws:
org.quartz.SchedulerException
-
deleteTrigger
- Throws:
org.quartz.SchedulerException
-
deleteTrigger
- Throws:
org.quartz.SchedulerException
-
deleteTrigger
- Throws:
org.quartz.SchedulerException
-
startScheduler
public void startScheduler() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-
getScheduler
public org.quartz.Scheduler getScheduler() -
setScheduler
public void setScheduler(org.quartz.Scheduler scheduler)
-