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

SpringBeanJobFactory

open class SpringBeanJobFactory : AdaptableJobFactory, SchedulerContextAware

Subclass of AdaptableJobFactory that also supports Spring-style dependency injection on bean properties. This is essentially the direct equivalent of Spring's QuartzJobBean in the shape of a Quartz org.quartz.spi.JobFactory.

Applies scheduler context, job data map and trigger data map entries as bean property values. If no matching bean property is found, the entry is by default simply ignored. This is analogous to QuartzJobBean's behavior.

Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.

Author
Juergen Hoeller

Since
2.0

See Also
SchedulerFactoryBean#setJobFactoryQuartzJobBean

Constructors

<init>

SpringBeanJobFactory()

Subclass of AdaptableJobFactory that also supports Spring-style dependency injection on bean properties. This is essentially the direct equivalent of Spring's QuartzJobBean in the shape of a Quartz org.quartz.spi.JobFactory.

Applies scheduler context, job data map and trigger data map entries as bean property values. If no matching bean property is found, the entry is by default simply ignored. This is analogous to QuartzJobBean's behavior.

Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.

Functions

setIgnoredUnknownProperties

open fun setIgnoredUnknownProperties(vararg ignoredUnknownProperties: String): Unit

Specify the unknown properties (not found in the bean) that should be ignored.

Default is null, indicating that all unknown properties should be ignored. Specify an empty array to throw an exception in case of any unknown properties, or a list of property names that should be ignored if there is no corresponding property found on the particular job class (all other unknown properties will still trigger an exception).

setSchedulerContext

open fun setSchedulerContext(schedulerContext: SchedulerContext): Unit

Inherited Functions

newJob

open fun newJob(bundle: TriggerFiredBundle, scheduler: Scheduler): Job