public class SpringBeanJobFactory extends AdaptableJobFactory implements SchedulerContextAware
AdaptableJobFactorythat also supports Spring-style dependency injection on bean properties. This is essentially the direct equivalent of Spring's
QuartzJobBeanin the shape of a Quartz 1.5
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 1.8 as well as Quartz 2.0-2.2, as of Spring 4.0. Note: Quartz 1.x support is deprecated - please upgrade to Quartz 2.0+.
|Constructor and Description|
|Modifier and Type||Method and Description|
Create the job instance, populating it with property values taken from the scheduler context, job data map and trigger data map.
Return whether the given job object is eligible for having its bean properties populated.
Specify the unknown properties (not found in the bean) that should be ignored.
Set the SchedulerContext of the current Quartz Scheduler.
adaptJob, newJob, newJob
public void setIgnoredUnknownProperties(String... ignoredUnknownProperties)
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).
public void setSchedulerContext(SchedulerContext schedulerContext)
protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception
protected boolean isEligibleForPropertyPopulation(Object jobObject)
The default implementation ignores
which will inject bean properties themselves.
jobObject- the job object to introspect