Class SchedulerSwiftlet

java.lang.Object
com.swiftmq.swiftlet.Swiftlet
com.swiftmq.swiftlet.scheduler.SchedulerSwiftlet

public abstract class SchedulerSwiftlet extends Swiftlet
The Scheduler Swiftlet is responsible to schedule Jobs. To this, JobFactories are registered via a JobGroup. The actual scheduling is usually done by the user via the Scheduler Swiftlet configuration. During a schedule, a Job object is created out of the JobFactory. It is also possible to add and remove temporary schedules programmatically. A temporary schedule is a schedule which isn't saved to the routerconfig.xml.
Author:
IIT GmbH, Bremen/Germany, Copyright (c) 2000-2003, All Rights Reserved
  • Constructor Details

    • SchedulerSwiftlet

      public SchedulerSwiftlet()
  • Method Details

    • getJobGroup

      public abstract JobGroup getJobGroup(String name)
      Returns the JobGroup with the given name. If the JobGroup doesn't exists, it will be created and stored. Subsequent calls will return the same JobGroup object.
      Parameters:
      name - Name of the JobGroup
      Returns:
      JobGroup
    • addTemporarySchedule

      public abstract void addTemporarySchedule(String name, String jobGroup, String jobName, String calendar, String dateFrom, String dateTo, String timeExpression, String maxRuntime, boolean loggingEnabled) throws InvalidScheduleException
      Add a new temporary schedule. A temporary schedule is a schedule which isn't saved to the routerconfig.xml. Instead it must be created and removed programmatically.
      Parameters:
      name - The name of the schedule
      jobGroup - Name of the job group
      jobName - Name of the job
      calendar - Name of the calendar to use (optional)
      dateFrom - From date in format "yyyy-MM-dd" (optional)
      dateTo - To date in format "yyyy-MM-dd" (optional)
      timeExpression - Time expression in format "('at' HH:mm[:ss][, HH:mm[:ss]...]) | ('start' HH:mm[:ss] 'stop' HH:mm[:ss] 'delay' n('s'|'m'|'h' ['repeat' n])"
      maxRuntime - Max. runtime in format "n('s'|'m'|'h')"
      loggingEnabled - States whether the start/stop of jobs should be logged in SwiftMQ's log files
      Throws:
      InvalidScheduleException - if the schedule is invalid
    • removeTemporarySchedule

      public abstract boolean removeTemporarySchedule(String name)
      Remove a temporary schedule.
      Parameters:
      name - The name of the schedule
      Returns:
      true if the schedule was found and removed