|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.scheduling.quartz.AdaptableJobFactory org.springframework.scheduling.quartz.SpringBeanJobFactory
public class SpringBeanJobFactory
Subclass of AdaptableBeanFactory 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 1.5 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.
QuartzJobBean
Constructor Summary | |
---|---|
SpringBeanJobFactory()
|
Method Summary | |
---|---|
protected Object |
createJobInstance(TriggerFiredBundle bundle)
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 jobObject)
Return whether the given job object is eligible for having its bean properties populated. |
void |
setIgnoredUnknownProperties(boolean ignoredUnknownProperties)
Set whether unknown properties (not found in the bean) should be ignored. |
void |
setSchedulerContext(SchedulerContext schedulerContext)
Set the SchedulerContext of the current Quartz Scheduler. |
Methods inherited from class org.springframework.scheduling.quartz.AdaptableJobFactory |
---|
adaptJob, newJob |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringBeanJobFactory()
Method Detail |
---|
public void setIgnoredUnknownProperties(boolean ignoredUnknownProperties)
public void setSchedulerContext(SchedulerContext schedulerContext)
SchedulerContextAware
setSchedulerContext
in interface SchedulerContextAware
Scheduler.getContext()
protected Object createJobInstance(TriggerFiredBundle bundle)
createJobInstance
in class AdaptableJobFactory
bundle
- the TriggerFiredBundle from which the JobDetail
and other info relating to the trigger firing can be obtained
protected boolean isEligibleForPropertyPopulation(Object jobObject)
The default implementation ignores QuartzJobBeans, which will inject bean properties themselves.
jobObject
- the job object to introspect
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |