Package org.knowm.sundial.plugins
Class AnnotationJobTriggerPlugin
java.lang.Object
org.knowm.sundial.plugins.AnnotationJobTriggerPlugin
- All Implemented Interfaces:
SchedulerPlugin
This plugin adds jobs and schedules them with triggers from annotated Job classes as the
scheduler is initialized.
- Author:
- timmolter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCronTrigger(CronTrigger cronTrigger, String jobName) buildSimpleTrigger(SimpleTrigger simpleTrigger, String jobName) voidinitialize(String name, Scheduler scheduler) Called during creation of theSchedulerin order to give theSchedulerPlugina chance to initialize.voidshutdown()Overridden to ignore wrapInUserTransaction because shutdown() does not interact with theScheduler.voidstart()Called when the associatedScheduleris started, in order to let the plug-in know it can now make calls into the scheduler if it needs to.
-
Constructor Details
-
AnnotationJobTriggerPlugin
Constructor- Parameters:
packageName- A comma(,) or colon(:) can be used to specify multiple packages to scan for Jobs.
-
-
Method Details
-
initialize
Called during creation of theSchedulerin order to give theSchedulerPlugina chance to initialize.- Specified by:
initializein interfaceSchedulerPlugin- Parameters:
name- The name by which the plugin is identified.scheduler- The scheduler to which the plugin is registered.- Throws:
SchedulerConfigException- if there is an error initializing.SchedulerException
-
start
public void start()Description copied from interface:SchedulerPluginCalled when the associatedScheduleris started, in order to let the plug-in know it can now make calls into the scheduler if it needs to.- Specified by:
startin interfaceSchedulerPlugin
-
buildCronTrigger
public OperableTrigger buildCronTrigger(CronTrigger cronTrigger, String jobName) throws ParseException - Throws:
ParseException
-
buildSimpleTrigger
-
shutdown
public void shutdown()Overridden to ignore wrapInUserTransaction because shutdown() does not interact with theScheduler.- Specified by:
shutdownin interfaceSchedulerPlugin
-