Class SchedulerFactoryBean

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.quartz.Scheduler>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.ResourceLoaderAware, org.springframework.context.SmartLifecycle

    public class SchedulerFactoryBean
    extends org.springframework.scheduling.quartz.SchedulerFactoryBean
    implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.context.ApplicationContextAware
    Produces a Scheduler which automatically loads all the triggers it can find.
    Since:
    3.0-Beta3
    • Field Summary

      • Fields inherited from class org.springframework.scheduling.quartz.SchedulerFactoryBean

        DEFAULT_THREAD_COUNT, PROP_THREAD_COUNT
      • Fields inherited from class org.springframework.scheduling.quartz.SchedulerAccessor

        logger, resourceLoader
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onApplicationEvent​(org.springframework.context.event.ContextRefreshedEvent event)  
      protected void registerTrigger​(java.lang.String beanName, org.quartz.Trigger trigger)
      Registers a Trigger.
      protected void restartIfNeeded()
      Similar to the SchedulerFactoryBean.isRunning() method, but properly handles the situation where the Scheduler has been completely shutdown and therefore must be replaced.
      void setApplicationContext​(org.springframework.context.ApplicationContext ctx)  
      • Methods inherited from class org.springframework.scheduling.quartz.SchedulerFactoryBean

        afterPropertiesSet, createScheduler, destroy, getConfigTimeDataSource, getConfigTimeNonTransactionalDataSource, getConfigTimeResourceLoader, getConfigTimeTaskExecutor, getObject, getObjectType, getPhase, getScheduler, isAutoStartup, isRunning, isSingleton, setApplicationContextSchedulerContextKey, setAutoStartup, setBeanName, setConfigLocation, setDataSource, setExposeSchedulerInRepository, setJobFactory, setNonTransactionalDataSource, setPhase, setQuartzProperties, setSchedulerContextAsMap, setSchedulerFactory, setSchedulerFactoryClass, setSchedulerName, setStartupDelay, setTaskExecutor, setWaitForJobsToCompleteOnShutdown, start, startScheduler, stop, stop
      • Methods inherited from class org.springframework.scheduling.quartz.SchedulerAccessor

        registerJobsAndTriggers, registerListeners, setCalendars, setGlobalJobListeners, setGlobalTriggerListeners, setJobDetails, setJobSchedulingDataLocation, setJobSchedulingDataLocations, setOverwriteExistingJobs, setResourceLoader, setSchedulerListeners, setTransactionManager, setTriggers
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SchedulerFactoryBean

        public SchedulerFactoryBean()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext ctx)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Overrides:
        setApplicationContext in class org.springframework.scheduling.quartz.SchedulerFactoryBean
      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.context.event.ContextRefreshedEvent event)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
      • registerTrigger

        protected void registerTrigger​(java.lang.String beanName,
                                       org.quartz.Trigger trigger)
        Registers a Trigger. A method like this should really have protected visibility in the superclass.
      • restartIfNeeded

        protected void restartIfNeeded()
        Similar to the SchedulerFactoryBean.isRunning() method, but properly handles the situation where the Scheduler has been completely shutdown and therefore must be replaced.