Class ImportScheduler

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    public class ImportScheduler
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean
    Maintains the Provisioner's import schedule defined in provisiond-configuration.xml
    Version:
    $Id: $
    Author:
    David Hustace
    • Field Detail

      • JOB_GROUP

        protected static final java.lang.String JOB_GROUP
        Constant JOB_GROUP="Provisiond"
        See Also:
        Constant Field Values
    • Constructor Detail

      • ImportScheduler

        protected ImportScheduler​(org.quartz.Scheduler scheduler)

        Constructor for ImportScheduler.

        Parameters:
        scheduler - a Scheduler object.
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • start

        public void start()
                   throws org.quartz.SchedulerException

        start

        Throws:
        org.quartz.SchedulerException - if any.
      • pause

        public void pause()
                   throws org.quartz.SchedulerException

        pause

        Throws:
        org.quartz.SchedulerException - if any.
      • standBy

        public void standBy()
                     throws org.quartz.SchedulerException

        standBy

        Throws:
        org.quartz.SchedulerException - if any.
      • resume

        public void resume()
                    throws org.quartz.SchedulerException

        resume

        Throws:
        org.quartz.SchedulerException - if any.
      • stop

        public void stop()
                  throws org.quartz.SchedulerException

        stop

        Throws:
        org.quartz.SchedulerException - if any.
      • rebuildImportSchedule

        protected void rebuildImportSchedule()
                                      throws java.lang.Exception
        Removes all jobs from the current scheduled and the builds a new schedule from the reloaded configuration. Since all jobs are Cron like, removing and re-adding shouldn't be an issue.
        Throws:
        java.lang.Exception - if any.
      • removeCurrentJobsFromSchedule

        protected void removeCurrentJobsFromSchedule()
                                              throws org.quartz.SchedulerException
        Iterates of current job list and removes each job from the underlying schedule
        Throws:
        org.quartz.SchedulerException - if any.
      • buildImportSchedule

        protected void buildImportSchedule()

        buildImportSchedule

      • getScheduler

        public org.quartz.Scheduler getScheduler()

        getScheduler

        Returns:
        a Scheduler object.
      • setProvisioner

        public void setProvisioner​(Provisioner provisioner)

        setProvisioner

        Parameters:
        provisioner - a Provisioner object.
      • setImportJobFactory

        public void setImportJobFactory​(org.quartz.spi.JobFactory importJobFactory)

        setImportJobFactory

        Parameters:
        importJobFactory - a JobFactory object.
      • getImportJobFactory

        public org.quartz.spi.JobFactory getImportJobFactory()

        getImportJobFactory

        Returns:
        a JobFactory object.