Class QuartzListener

java.lang.Object
io.goobi.viewer.model.job.quartz.QuartzListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

@WebListener public class QuartzListener extends Object implements javax.servlet.ServletContextListener
  • Field Details

  • Constructor Details

  • Method Details

    • restartTimedJobs

      public void restartTimedJobs() throws org.quartz.SchedulerException
      Restarts timed Jobs
      Throws:
      org.quartz.SchedulerException
    • addTrigger

      public void addTrigger(Map<String,RecurringTaskTrigger> storedTriggers, List<RecurringTaskTrigger> triggers, TaskType taskType, TaskTriggerStatus defaultStatus) throws DAOException
      Throws:
      DAOException
    • initializeMinutelyJob

      public static void initializeMinutelyJob(IViewerJob goobiJob, org.quartz.Scheduler sched, int minutes) throws org.quartz.SchedulerException
      initializes given IViewerJob to run every minute
      Parameters:
      goobiJob -
      sched -
      minutes -
      Throws:
      org.quartz.SchedulerException
    • initializeHourlyJob

      public static void initializeHourlyJob(IViewerJob goobiJob, org.quartz.Scheduler sched, int hours) throws org.quartz.SchedulerException
      initializes given IViewerJob to run every hour
      Parameters:
      goobiJob -
      sched -
      hours -
      Throws:
      org.quartz.SchedulerException
    • initializeDailyJob

      public static void initializeDailyJob(IViewerJob goobiJob, org.quartz.Scheduler sched) throws org.quartz.SchedulerException
      initializes given IViewerJob to run every day at midnight
      Parameters:
      goobiJob -
      sched -
      Throws:
      org.quartz.SchedulerException
    • executeJobOnce

      public static void executeJobOnce(IViewerJob goobiJob, org.quartz.Scheduler sched) throws org.quartz.SchedulerException
      execute a given IViewerJob a single time
      Parameters:
      goobiJob -
      sched -
      Throws:
      org.quartz.SchedulerException
    • initializeCronJob

      public static org.quartz.JobDetail initializeCronJob(IViewerJob goobiJob, org.quartz.Scheduler sched) throws org.quartz.SchedulerException
      initializes given IViewerJob to run at specified times
      Parameters:
      goobiJob -
      sched -
      Returns:
      JobDetail
      Throws:
      org.quartz.SchedulerException
    • contextDestroyed

      public void contextDestroyed(javax.servlet.ServletContextEvent arg0)
      Specified by:
      contextDestroyed in interface javax.servlet.ServletContextListener
    • contextInitialized

      public void contextInitialized(javax.servlet.ServletContextEvent evt)
      Specified by:
      contextInitialized in interface javax.servlet.ServletContextListener