Package com.swiftmq.swiftlet.scheduler
Class SchedulerSwiftlet
java.lang.Object
com.swiftmq.swiftlet.Swiftlet
com.swiftmq.swiftlet.scheduler.SchedulerSwiftlet
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
-
Field Summary
Fields inherited from class com.swiftmq.swiftlet.Swiftlet
STATE_ACTIVE, STATE_INACTIVE, STATE_STANDBY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addTemporarySchedule
(String name, String jobGroup, String jobName, String calendar, String dateFrom, String dateTo, String timeExpression, String maxRuntime, boolean loggingEnabled) Add a new temporary schedule.abstract JobGroup
getJobGroup
(String name) Returns the JobGroup with the given name.abstract boolean
Remove a temporary schedule.Methods inherited from class com.swiftmq.swiftlet.Swiftlet
getName, getStartupTime, getState, isSnapshotAvailable, resume, setStartupTime, shutdown, standby, startup
-
Constructor Details
-
SchedulerSwiftlet
public SchedulerSwiftlet()
-
-
Method Details
-
getJobGroup
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 schedulejobGroup
- Name of the job groupjobName
- Name of the jobcalendar
- 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
Remove a temporary schedule.- Parameters:
name
- The name of the schedule- Returns:
- true if the schedule was found and removed
-