org.xmlBlaster.contrib.scheduler
Class SchedulerPlugin
java.lang.Object
org.xmlBlaster.contrib.GlobalInfo
org.xmlBlaster.contrib.scheduler.SchedulerPlugin
- All Implemented Interfaces:
- org.quartz.Job, I_Info, SchedulerPluginMBean, I_Plugin
public class SchedulerPlugin
- extends GlobalInfo
- implements SchedulerPluginMBean, org.quartz.Job
Nested Class Summary |
class |
SchedulerPlugin.CronData
The syntax for the configuration is as for crontab:
http://www.adminschoice.com/docs/crontab.htm#Crontab%20file
. |
Methods inherited from class org.xmlBlaster.contrib.GlobalInfo |
dump, get, getBoolean, getGlobal, getInt, getKeys, getLong, getObject, getObjectKeys, getOriginalGlobal, getRaw, getStrippedString, getType, getVersion, init, loadPlugin, put, putObject, putRaw, replaceAllEntries, setStrippedHostname |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WEEK_NAMES
private static final java.lang.String[] WEEK_NAMES
MONTH_NAMES
private static final java.lang.String[] MONTH_NAMES
log
private static final java.util.logging.Logger log
sched
private org.quartz.Scheduler sched
cronDataMap
private java.util.Map cronDataMap
mbeanHandle
private java.lang.Object mbeanHandle
SchedulerPlugin
public SchedulerPlugin()
startSchedule
private void startSchedule(org.quartz.Scheduler sched,
java.lang.String name,
SchedulerPlugin.CronData data)
throws XmlBlasterException
- Throws:
XmlBlasterException
addSchedulerWithEx
private SchedulerPlugin.CronData addSchedulerWithEx(java.lang.String name,
java.lang.String value)
throws org.quartz.SchedulerException,
XmlBlasterException
- Throws:
org.quartz.SchedulerException
XmlBlasterException
removeScheduler
public java.lang.String removeScheduler(java.lang.String name)
- Specified by:
removeScheduler
in interface SchedulerPluginMBean
doInit
protected void doInit(Global glob,
PluginInfo plugInfo)
throws XmlBlasterException
- Specified by:
doInit
in class GlobalInfo
- Parameters:
glob
- The global passed by the RunLevelManager, this is not the object owned by the plugin. It is the original global.
- Throws:
XmlBlasterException
execute
public void execute(org.quartz.JobExecutionContext context)
throws org.quartz.JobExecutionException
- Specified by:
execute
in interface org.quartz.Job
- Throws:
org.quartz.JobExecutionException
shutdown
public void shutdown()
throws XmlBlasterException
- Description copied from interface:
I_Plugin
- Cleans up the resource.
- Specified by:
shutdown
in interface SchedulerPluginMBean
- Specified by:
shutdown
in interface I_Plugin
- Overrides:
shutdown
in class GlobalInfo
- Throws:
XmlBlasterException
- if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.- See Also:
I_Plugin.shutdown()
getSchedulerList
public java.lang.String getSchedulerList()
- Specified by:
getSchedulerList
in interface SchedulerPluginMBean
addScheduler
public java.lang.String addScheduler(java.lang.String name,
java.lang.String value)
- Specified by:
addScheduler
in interface SchedulerPluginMBean
getJobNames
public java.lang.String getJobNames()
throws org.quartz.SchedulerException
- Specified by:
getJobNames
in interface SchedulerPluginMBean
- Throws:
org.quartz.SchedulerException
Copyright © 1999-2014 The xmlBlaster.org contributers.