FactoryBean<org.quartz.Scheduler>
, InitializableBean
public class QuartzSchedulerFactoryBean extends java.lang.Object implements InitializableBean, FactoryBean<org.quartz.Scheduler>
FactoryBean
implementation that builds a QuartzScheduler.FACTORY_METHOD_NAME
Constructor | Description |
---|---|
QuartzSchedulerFactoryBean() |
Modifier and Type | Method | Description |
---|---|---|
protected org.quartz.Scheduler |
createScheduler() |
Create the Scheduler instance.
|
org.quartz.Scheduler |
getObject() |
Return an instance (possibly shared or independent) of the object managed by this factory.
|
void |
initialize() |
Invoke on initialization after it has set all bean properties supplied.
|
void |
setExposeSchedulerInRepository(boolean exposeSchedulerInRepository) |
Set whether to expose the Aspectran-managed
Scheduler instance in the
Quartz SchedulerRepository . |
void |
setQuartzProperties(java.util.Properties quartzProperties) |
Set quartz properties.
|
void |
setSchedulerName(java.lang.String schedulerName) |
Set the name of the Scheduler to create via the SchedulerFactory.
|
public void setSchedulerName(java.lang.String schedulerName)
If not specified, the bean name will be used as default scheduler name.
schedulerName
- the scheduler nameSchedulerFactory.getScheduler()
,
SchedulerFactory.getScheduler(String)
public void setQuartzProperties(java.util.Properties quartzProperties)
quartzProperties
- the quartz propertiespublic void setExposeSchedulerInRepository(boolean exposeSchedulerInRepository)
Scheduler
instance in the
Quartz SchedulerRepository
. Default is "false", since the Aspectran-managed
Scheduler is usually exclusively intended for access within the Aspectran context.
Switch this flag to "true" in order to expose the Scheduler globally. This is not recommended unless you have an existing Aspectran application that relies on this behavior.
exposeSchedulerInRepository
- whether to expose scheduler in the quartz scheduler repositoryprotected org.quartz.Scheduler createScheduler() throws org.quartz.SchedulerException
The default implementation invokes SchedulerFactory's getScheduler
method. Can be overridden for custom Scheduler creation.
org.quartz.SchedulerException
- if thrown by Quartz methodsSchedulerFactory.getScheduler()
public void initialize() throws java.lang.Exception
InitializableBean
initialize
in interface InitializableBean
java.lang.Exception
- if initialization failspublic org.quartz.Scheduler getObject()
FactoryBean
getObject
in interface FactoryBean<org.quartz.Scheduler>
Copyright © 2008–2018 The Aspectran Project. All rights reserved.