spring-framework / org.springframework.scheduling.quartz / SimpleTriggerFactoryBean

SimpleTriggerFactoryBean

open class SimpleTriggerFactoryBean : FactoryBean<SimpleTrigger>, BeanNameAware, InitializingBean

A Spring FactoryBean for creating a Quartz org.quartz.SimpleTrigger instance, supporting bean-style usage for trigger configuration.

SimpleTrigger(Impl) itself is already a JavaBean but lacks sensible defaults. This class uses the Spring bean name as job name, the Quartz default group ("DEFAULT") as job group, the current time as start time, and indefinite repetition, if not specified.

This class will also register the trigger with the job name and group of a given org.quartz.JobDetail. This allows SchedulerFactoryBean to automatically register a trigger for the corresponding JobDetail, instead of registering the JobDetail separately.

Author
Juergen Hoeller

Since
3.1

See Also
#setName#setGroup#setStartDelay#setJobDetailSchedulerFactoryBean#setTriggersSchedulerFactoryBean#setJobDetails

Constructors

<init>

SimpleTriggerFactoryBean()

A Spring FactoryBean for creating a Quartz org.quartz.SimpleTrigger instance, supporting bean-style usage for trigger configuration.

SimpleTrigger(Impl) itself is already a JavaBean but lacks sensible defaults. This class uses the Spring bean name as job name, the Quartz default group ("DEFAULT") as job group, the current time as start time, and indefinite repetition, if not specified.

This class will also register the trigger with the job name and group of a given org.quartz.JobDetail. This allows SchedulerFactoryBean to automatically register a trigger for the corresponding JobDetail, instead of registering the JobDetail separately.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

getJobDataMap

open fun getJobDataMap(): JobDataMap

Return the trigger's JobDataMap.

getObject

open fun getObject(): SimpleTrigger

getObjectType

open fun getObjectType(): Class<*>

isSingleton

open fun isSingleton(): Boolean

setBeanName

open fun setBeanName(beanName: String): Unit

setDescription

open fun setDescription(description: String): Unit

Associate a textual description with this trigger.

setGroup

open fun setGroup(group: String): Unit

Specify the trigger's group.

setJobDataAsMap

open fun setJobDataAsMap(jobDataAsMap: MutableMap<String, *>): Unit

Register objects in the JobDataMap via a given Map.

These objects will be available to this Trigger only, in contrast to objects in the JobDetail's data map.

setJobDataMap

open fun setJobDataMap(jobDataMap: JobDataMap): Unit

Set the trigger's JobDataMap.

setJobDetail

open fun setJobDetail(jobDetail: JobDetail): Unit

Set the JobDetail that this trigger should be associated with.

setMisfireInstruction

open fun setMisfireInstruction(misfireInstruction: Int): Unit

Specify a misfire instruction for this trigger.

setMisfireInstructionName

open fun setMisfireInstructionName(constantName: String): Unit

Set the misfire instruction via the name of the corresponding constant in the org.quartz.SimpleTrigger class. Default is MISFIRE_INSTRUCTION_SMART_POLICY.

setName

open fun setName(name: String): Unit

Specify the trigger's name.

setPriority

open fun setPriority(priority: Int): Unit

Specify the priority of this trigger.

setRepeatCount

open fun setRepeatCount(repeatCount: Int): Unit

Specify the number of times this trigger is supposed to fire.

Default is to repeat indefinitely.

setRepeatInterval

open fun setRepeatInterval(repeatInterval: Long): Unit

Specify the interval between execution times of this trigger.

setStartDelay

open fun setStartDelay(startDelay: Long): Unit

Set the start delay in milliseconds.

The start delay is added to the current system time (when the bean starts) to control the start time of the trigger.

setStartTime

open fun setStartTime(startTime: Date): Unit

Set a specific start time for the trigger.

Note that a dynamically computed #setStartDelay specification overrides a static timestamp set here.