java.lang.Object | ||
↳ | JobDetail | |
↳ | org.springframework.scheduling.quartz.JobDetailBean |
Convenience subclass of Quartz's org.quartz.JobDetail class, making bean-style usage easier.
JobDetail
itself is already a JavaBean but lacks
sensible defaults. This class uses the Spring bean name as job name,
and the Quartz default group ("DEFAULT") as job group if not specified.
BeanNameAware
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
| |||||||||||
Overridden to support any job class, to allow a custom JobFactory
to adapt the given job class to the Quartz Job interface.
| |||||||||||
Set the ApplicationContext that this object runs in.
| |||||||||||
Set the key of an ApplicationContext reference to expose in the JobDataMap,
for example "applicationContext".
| |||||||||||
Set the name of the bean in the bean factory that created this bean.
| |||||||||||
Overridden to support any job class, to allow a custom JobFactory
to adapt the given job class to the Quartz Job interface.
| |||||||||||
Register objects in the JobDataMap via a given Map.
| |||||||||||
Set a list of JobListener names for this job, referring to
non-global JobListeners registered with the Scheduler.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.BeanNameAware
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
Overridden to support any job class, to allow a custom JobFactory to adapt the given job class to the Quartz Job interface.
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 afterPropertiesSet()
or a custom init-method. Invoked after setResourceLoader(ResourceLoader)
,
setApplicationEventPublisher(ApplicationEventPublisher)
and
MessageSourceAware
, if applicable.
applicationContext | the ApplicationContext object to be used by this object |
---|
Set the key of an ApplicationContext reference to expose in the JobDataMap, for example "applicationContext". Default is none. Only applicable when running in a Spring ApplicationContext.
In case of a QuartzJobBean, the reference will be applied to the Job instance as bean property. An "applicationContext" attribute will correspond to a "setApplicationContext" method in that scenario.
Note that BeanFactory callback interfaces like ApplicationContextAware are not automatically applied to Quartz Job instances, because Quartz itself is responsible for the lifecycle of its Jobs.
Note: When using persistent job stores where JobDetail contents will be kept in the database, do not put an ApplicationContext reference into the JobDataMap but rather into the SchedulerContext.
Set the name of the bean in the bean factory that created this bean.
Invoked after population of normal bean properties but before an
init callback such as afterPropertiesSet()
or a custom init-method.
beanName | the name of the bean in the factory. Note that this name is the actual bean name used in the factory, which may differ from the originally specified name: in particular for inner bean names, the actual bean name might have been made unique through appending "#..." suffixes. Use the BeanFactoryUtils#originalBeanName(String) method to extract the original bean name (without suffix), if desired. |
---|
Overridden to support any job class, to allow a custom JobFactory to adapt the given job class to the Quartz Job interface.
Register objects in the JobDataMap via a given Map.
These objects will be available to this Job only, in contrast to objects in the SchedulerContext.
Note: When using persistent Jobs whose JobDetail will be kept in the database, do not put Spring-managed beans or an ApplicationContext reference into the JobDataMap but rather into the SchedulerContext.
jobDataAsMap | Map with String keys and any objects as values (for example Spring-managed beans) |
---|
Set a list of JobListener names for this job, referring to non-global JobListeners registered with the Scheduler.
A JobListener name always refers to the name returned by the JobListener implementation.
setJobListeners(JobListener[])