Package com.swiftmq.swiftlet.scheduler
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
-
-
Field Summary
-
Fields inherited from class com.swiftmq.swiftlet.Swiftlet
STATE_ACTIVE, STATE_INACTIVE, STATE_STANDBY
-
-
Constructor Summary
Constructors Constructor Description SchedulerSwiftlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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)
Add a new temporary schedule.abstract JobGroup
getJobGroup(java.lang.String name)
Returns the JobGroup with the given name.abstract boolean
removeTemporarySchedule(java.lang.String name)
Remove a temporary schedule.-
Methods inherited from class com.swiftmq.swiftlet.Swiftlet
getName, getStartupTime, getState, isSnapshotAvailable, resume, setStartupTime, shutdown, standby, startup
-
-
-
-
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 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
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
-
-