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.
SchedulerFactoryBean#setJobFactory, QuartzJobBean
| Modifier and Type | Field and Description |
|---|---|
| private ApplicationContext | |
| private String[] | |
| private org. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | createJobInstance(org.
the TriggerFiredBundle from which the JobDetail
and other info relating to the trigger firing can be obtained bundleOverrides org. Create the job instance, populating it with property values taken from the scheduler context, job data map and trigger data map. |
| protected boolean | isEligibleForPropertyPopulation(Object
the job object to introspect jobObject)Return whether the given job object is eligible for having its bean properties populated. |
| public void | setApplicationContext(ApplicationContext
the ApplicationContext object to be used by this object applicationContext)Implements org. Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object. |
| public void | setIgnoredUnknownProperties(String... ignoredUnknownProperties)
Specify the unknown properties (not found in the bean) that should be ignored. |
| public void | setSchedulerContext(org.
Implements org. Set the SchedulerContext of the current Quartz Scheduler. |
| applicationContext | back to summary |
|---|---|
| private ApplicationContext applicationContext
| |
| ignoredUnknownProperties | back to summary |
|---|---|
| private String[] ignoredUnknownProperties
| |
| schedulerContext | back to summary |
|---|---|
| private org. | |
| SpringBeanJobFactory | back to summary |
|---|---|
| public SpringBeanJobFactory() | |
| createJobInstance | back to summary |
|---|---|
| protected Object createJobInstance(org. Overrides org. Create the job instance, populating it with property values taken from the scheduler context, job data map and trigger data map.
| |
| isEligibleForPropertyPopulation | back to summary |
|---|---|
| protected boolean isEligibleForPropertyPopulation(Object jobObject) Return whether the given job object is eligible for having its bean properties populated. The default implementation ignores
| |
| setApplicationContext | back to summary |
|---|---|
| public void setApplicationContext(ApplicationContext applicationContext) Implements org. Doc from org. Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object. Invoked after population of normal bean properties but before an init callback such
as
| |
| setIgnoredUnknownProperties | back to summary |
|---|---|
| public void setIgnoredUnknownProperties(String... ignoredUnknownProperties) Specify the unknown properties (not found in the bean) that should be ignored. Default is | |
| setSchedulerContext | back to summary |
|---|---|
| public void setSchedulerContext(org. Implements org. Doc from org. Set the SchedulerContext of the current Quartz Scheduler.
| |