Class 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 Detail

      • SchedulerSwiftlet

        public SchedulerSwiftlet()
    • Method Detail

      • getJobGroup

        public abstract JobGroup getJobGroup​(java.lang.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​(java.lang.String name,
                                                  java.lang.String jobGroup,
                                                  java.lang.String jobName,
                                                  java.lang.String calendar,
                                                  java.lang.String dateFrom,
                                                  java.lang.String dateTo,
                                                  java.lang.String timeExpression,
                                                  java.lang.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​(java.lang.String name)
        Remove a temporary schedule.
        Parameters:
        name - The name of the schedule
        Returns:
        true if the schedule was found and removed