Class QuartzSchedulerFactoryBean

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

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

      • QuartzSchedulerFactoryBean

        public QuartzSchedulerFactoryBean()
    • Method Detail

      • setSchedulerName

        public void setSchedulerName​(java.lang.String schedulerName)
        Set the name of the Scheduler to create via the SchedulerFactory.

        If not specified, the bean name will be used as default scheduler name.

        Parameters:
        schedulerName - the scheduler name
        See Also:
        SchedulerFactory.getScheduler(), SchedulerFactory.getScheduler(String)
      • setQuartzProperties

        public void setQuartzProperties​(java.util.Properties quartzProperties)
        Set quartz properties.
        Parameters:
        quartzProperties - the quartz properties
      • setExposeSchedulerInRepository

        public void setExposeSchedulerInRepository​(boolean exposeSchedulerInRepository)
        Set whether to expose the Aspectran-managed 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.

        Parameters:
        exposeSchedulerInRepository - whether to expose scheduler in the quartz scheduler repository
      • createScheduler

        protected org.quartz.Scheduler createScheduler()
                                                throws org.quartz.SchedulerException
        Create the Scheduler instance.

        The default implementation invokes SchedulerFactory's getScheduler method. Can be overridden for custom Scheduler creation.

        Returns:
        the Scheduler instance
        Throws:
        org.quartz.SchedulerException - if thrown by Quartz methods
        See Also:
        SchedulerFactory.getScheduler()
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Description copied from interface: InitializableBean
        Invoke on initialization after it has set all bean properties supplied.
        Specified by:
        initialize in interface InitializableBean
        Throws:
        java.lang.Exception - if initialization fails
      • getObject

        public org.quartz.Scheduler getObject()
        Description copied from interface: FactoryBean
        Return an instance (possibly shared or independent) of the object managed by this factory. As with a BeanFactory, this allows support for both the Singleton and Prototype design pattern.
        Specified by:
        getObject in interface FactoryBean<org.quartz.Scheduler>
        Returns:
        an instance of the bean (can be null)