类 SchedulerAccessorBean
- java.lang.Object
- org.springframework.scheduling.quartz.SchedulerAccessor
- org.springframework.scheduling.quartz.SchedulerAccessorBean
- 所有已实现的接口:
Aware
,BeanFactoryAware
,InitializingBean
,ResourceLoaderAware
public class SchedulerAccessorBean extends SchedulerAccessor implements BeanFactoryAware, InitializingBean
Spring bean-style class for accessing a Quartz Scheduler, i.e. for registering jobs, triggers and listeners on a givenScheduler
instance.Compatible with Quartz 2.1.4 and higher, as of Spring 4.1.
- 从以下版本开始:
- 2.5.6
- 作者:
- Juergen Hoeller
- 另请参阅:
setScheduler(org.quartz.Scheduler)
,setSchedulerName(java.lang.String)
字段概要
从类继承的字段 org.springframework.scheduling.quartz.SchedulerAccessor
logger, resourceLoader
构造器概要
构造器 构造器 说明 SchedulerAccessorBean()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.protected Scheduler
findDefaultScheduler()
protected Scheduler
findScheduler(String schedulerName)
Scheduler
getScheduler()
Return the Quartz Scheduler instance that this accessor operates on.void
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.void
setScheduler(Scheduler scheduler)
Specify the QuartzScheduler
instance to operate on.void
setSchedulerName(String schedulerName)
Specify the QuartzScheduler
to operate on via its scheduler name in the Spring application context or also in the QuartzSchedulerRepository
.从类继承的方法 org.springframework.scheduling.quartz.SchedulerAccessor
registerJobsAndTriggers, registerListeners, setCalendars, setGlobalJobListeners, setGlobalTriggerListeners, setJobDetails, setJobSchedulingDataLocation, setJobSchedulingDataLocations, setOverwriteExistingJobs, setResourceLoader, setSchedulerListeners, setTransactionManager, setTriggers
构造器详细资料
SchedulerAccessorBean
public SchedulerAccessorBean()
方法详细资料
setSchedulerName
public void setSchedulerName(String schedulerName)
Specify the QuartzScheduler
to operate on via its scheduler name in the Spring application context or also in the QuartzSchedulerRepository
.Schedulers can be registered in the repository through custom bootstrapping, e.g. via the
StdSchedulerFactory
orDirectSchedulerFactory
factory classes. However, in general, it's preferable to use Spring'sSchedulerFactoryBean
which includes the job/trigger/listener capabilities of this accessor as well.If not specified, this accessor will try to retrieve a default
Scheduler
bean from the containing application context.
setScheduler
public void setScheduler(Scheduler scheduler)
getScheduler
public Scheduler getScheduler()
Return the Quartz Scheduler instance that this accessor operates on.- 指定者:
getScheduler
在类中SchedulerAccessor
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
从接口复制的说明:BeanFactoryAware
Callback that supplies the owning factory to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.- 指定者:
setBeanFactory
在接口中BeanFactoryAware
- 参数:
beanFactory
- owning BeanFactory (nevernull
). The bean can immediately call methods on the factory.- 另请参阅:
BeanInitializationException
afterPropertiesSet
public void afterPropertiesSet() throws SchedulerException
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- 指定者:
afterPropertiesSet
在接口中InitializingBean
- 抛出:
SchedulerException
findScheduler
protected Scheduler findScheduler(String schedulerName) throws SchedulerException
findDefaultScheduler
protected Scheduler findDefaultScheduler()