Class SchedulerSwiftletImpl
- java.lang.Object
-
- com.swiftmq.swiftlet.Swiftlet
-
- com.swiftmq.swiftlet.scheduler.SchedulerSwiftlet
-
- com.swiftmq.impl.scheduler.standard.SchedulerSwiftletImpl
-
public class SchedulerSwiftletImpl extends SchedulerSwiftlet
-
-
Field Summary
-
Fields inherited from class com.swiftmq.swiftlet.Swiftlet
STATE_ACTIVE, STATE_INACTIVE, STATE_STANDBY
-
-
Constructor Summary
Constructors Constructor Description SchedulerSwiftletImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 timeExpr, java.lang.String maxRuntime, boolean loggingEnabled)
Add a new temporary schedule.JobGroup
getJobGroup(java.lang.String s)
Returns the JobGroup with the given name.boolean
removeTemporarySchedule(java.lang.String name)
Remove a temporary schedule.protected void
shutdown()
Stop this Swiftlet.protected void
startup(Configuration config)
Start this Swiftlet.-
Methods inherited from class com.swiftmq.swiftlet.Swiftlet
getName, getStartupTime, getState, isSnapshotAvailable, resume, setStartupTime, standby
-
-
-
-
Method Detail
-
getJobGroup
public JobGroup getJobGroup(java.lang.String s)
Description copied from class:SchedulerSwiftlet
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.- Specified by:
getJobGroup
in classSchedulerSwiftlet
- Parameters:
s
- Name of the JobGroup- Returns:
- JobGroup
-
addTemporarySchedule
public 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 timeExpr, java.lang.String maxRuntime, boolean loggingEnabled) throws InvalidScheduleException
Description copied from class:SchedulerSwiftlet
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.- Specified by:
addTemporarySchedule
in classSchedulerSwiftlet
- 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)timeExpr
- 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 boolean removeTemporarySchedule(java.lang.String name)
Description copied from class:SchedulerSwiftlet
Remove a temporary schedule.- Specified by:
removeTemporarySchedule
in classSchedulerSwiftlet
- Parameters:
name
- The name of the schedule- Returns:
- true if the schedule was found and removed
-
startup
protected void startup(Configuration config) throws SwiftletException
Description copied from class:Swiftlet
Start this Swiftlet. Called from the SwiftletManager during router start. The Swiftlet configuration is passed as parameter.- Specified by:
startup
in classSwiftlet
- Parameters:
config
- Swiftlet configuration.- Throws:
SwiftletException
- on error during startup.
-
shutdown
protected void shutdown() throws SwiftletException
Description copied from class:Swiftlet
Stop this Swiftlet. Called from the SwiftletManager during router shutdown.- Specified by:
shutdown
in classSwiftlet
- Throws:
SwiftletException
- on error during shutdown.
-
-