org.quartz.impl
Class RemoteMBeanScheduler

java.lang.Object
  extended by org.quartz.impl.RemoteMBeanScheduler
All Implemented Interfaces:
Scheduler

public abstract class RemoteMBeanScheduler
extends java.lang.Object
implements Scheduler

An implementation of the Scheduler interface that remotely proxies all method calls to the equivalent call on a given QuartzScheduler instance, via JMX.

A user must create a subclass to implement the actual connection to the remote MBeanServer using their application specific connector. For example JBoss4RMIRemoteMBeanScheduler.

See Also:
Scheduler, QuartzScheduler, SchedulingContext

Field Summary
 
Fields inherited from interface org.quartz.Scheduler
DEFAULT_FAIL_OVER_GROUP, DEFAULT_GROUP, DEFAULT_MANUAL_TRIGGERS, DEFAULT_RECOVERY_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS, FAILED_JOB_ORIGINAL_TRIGGER_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_NAME
 
Constructor Summary
RemoteMBeanScheduler()
           
 
Method Summary
 void addCalendar(java.lang.String calName, Calendar calendar, boolean replace, boolean updateTriggers)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void addGlobalJobListener(JobListener jobListener)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void addGlobalTriggerListener(TriggerListener triggerListener)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void addJob(JobDetail jobDetail, boolean replace)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void addJobListener(JobListener jobListener)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void addSchedulerListener(SchedulerListener schedulerListener)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void addTriggerListener(TriggerListener triggerListener)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean deleteCalendar(java.lang.String calName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean deleteJob(java.lang.String jobName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
protected abstract  java.lang.Object getAttribute(java.lang.String attribute)
          Get the given attribute of the remote Scheduler MBean.
protected abstract  javax.management.AttributeList getAttributes(java.lang.String[] attributes)
          Get the given attributes of the remote Scheduler MBean.
 Calendar getCalendar(java.lang.String calName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 java.lang.String[] getCalendarNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 SchedulerContext getContext()
           Returns the SchedulerContext of the Scheduler.
 java.util.List getCurrentlyExecutingJobs()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 JobListener getGlobalJobListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.util.List getGlobalJobListeners()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 TriggerListener getGlobalTriggerListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.util.List getGlobalTriggerListeners()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 JobDetail getJobDetail(java.lang.String jobName, java.lang.String jobGroup)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 java.lang.String[] getJobGroupNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 JobListener getJobListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.util.Set getJobListenerNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.lang.String[] getJobNames(java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 SchedulerMetaData getMetaData()
           Get a SchedulerMetaData object describing the settings and capabilities of the scheduler instance.
 java.util.Set getPausedTriggerGroups()
           Get the names of all Trigger groups that are paused.
 java.lang.String getSchedulerInstanceId()
           Returns the instance Id of the Scheduler.
 java.util.List getSchedulerListeners()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.lang.String getSchedulerName()
           Returns the name of the Scheduler.
protected  javax.management.ObjectName getSchedulerObjectName()
          Get the name under which the Scheduler MBean is registered on the remote MBean server.
 Trigger getTrigger(java.lang.String triggerName, java.lang.String triggerGroup)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 java.lang.String[] getTriggerGroupNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 TriggerListener getTriggerListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.util.Set getTriggerListenerNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.lang.String[] getTriggerNames(java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Trigger[] getTriggersOfJob(java.lang.String jobName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 int getTriggerState(java.lang.String triggerName, java.lang.String triggerGroup)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
abstract  void initialize()
          Initialize this RemoteMBeanScheduler instance, connecting to the remote MBean server.
 boolean interrupt(java.lang.String jobName, java.lang.String groupName)
           Request the interruption, within this Scheduler instance, of all currently executing instances of the identified Job, which must be an implementor of the InterruptableJob interface.
protected abstract  java.lang.Object invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Invoke the given operation on the remote Scheduler MBean.
 boolean isInStandbyMode()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean isShutdown()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean isStarted()
          Whether the scheduler has been started.
 void pauseAll()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseJob(java.lang.String jobName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseJobGroup(java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseTrigger(java.lang.String triggerName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseTriggerGroup(java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean removeGlobalJobListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean removeGlobalTriggerListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean removeJobListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean removeSchedulerListener(SchedulerListener schedulerListener)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean removeTriggerListener(java.lang.String name)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 java.util.Date rescheduleJob(java.lang.String triggerName, java.lang.String groupName, Trigger newTrigger)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeAll()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeJob(java.lang.String jobName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeJobGroup(java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeTrigger(java.lang.String triggerName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeTriggerGroup(java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 java.util.Date scheduleJob(JobDetail jobDetail, Trigger trigger)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 java.util.Date scheduleJob(Trigger trigger)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void setJobFactory(JobFactory factory)
           Set the JobFactory that will be responsible for producing instances of Job classes.
 void setSchedulerObjectName(javax.management.ObjectName schedulerObjectName)
          Set the name under which the Scheduler MBean is registered on the remote MBean server.
 void setSchedulerObjectName(java.lang.String schedulerObjectName)
          Set the name under which the Scheduler MBean is registered on the remote MBean server.
 void setSchedulingContext(SchedulingContext schedulingContext)
          Set the scheduling context of this proxy.
 void shutdown()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void shutdown(boolean waitForJobsToComplete)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void standby()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void start()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void startDelayed(int seconds)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
protected  java.lang.Boolean toBoolean(boolean bool)
           
 void triggerJob(java.lang.String jobName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void triggerJob(java.lang.String jobName, java.lang.String groupName, JobDataMap data)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void triggerJobWithVolatileTrigger(java.lang.String jobName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void triggerJobWithVolatileTrigger(java.lang.String jobName, java.lang.String groupName, JobDataMap data)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean unscheduleJob(java.lang.String triggerName, java.lang.String groupName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteMBeanScheduler

public RemoteMBeanScheduler()
Method Detail

getSchedulerObjectName

protected javax.management.ObjectName getSchedulerObjectName()
Get the name under which the Scheduler MBean is registered on the remote MBean server.


setSchedulerObjectName

public void setSchedulerObjectName(java.lang.String schedulerObjectName)
                            throws SchedulerException
Set the name under which the Scheduler MBean is registered on the remote MBean server.

Throws:
SchedulerException

setSchedulerObjectName

public void setSchedulerObjectName(javax.management.ObjectName schedulerObjectName)
                            throws SchedulerException
Set the name under which the Scheduler MBean is registered on the remote MBean server.

Throws:
SchedulerException

setSchedulingContext

public void setSchedulingContext(SchedulingContext schedulingContext)
Set the scheduling context of this proxy.


initialize

public abstract void initialize()
                         throws SchedulerException
Initialize this RemoteMBeanScheduler instance, connecting to the remote MBean server.

Throws:
SchedulerException

getAttribute

protected abstract java.lang.Object getAttribute(java.lang.String attribute)
                                          throws SchedulerException
Get the given attribute of the remote Scheduler MBean.

Throws:
SchedulerException

getAttributes

protected abstract javax.management.AttributeList getAttributes(java.lang.String[] attributes)
                                                         throws SchedulerException
Get the given attributes of the remote Scheduler MBean.

Throws:
SchedulerException

invoke

protected abstract java.lang.Object invoke(java.lang.String operationName,
                                           java.lang.Object[] params,
                                           java.lang.String[] signature)
                                    throws SchedulerException
Invoke the given operation on the remote Scheduler MBean.

Throws:
SchedulerException

getSchedulerName

public java.lang.String getSchedulerName()
                                  throws SchedulerException

Returns the name of the Scheduler.

Specified by:
getSchedulerName in interface Scheduler
Throws:
SchedulerException

getSchedulerInstanceId

public java.lang.String getSchedulerInstanceId()
                                        throws SchedulerException

Returns the instance Id of the Scheduler.

Specified by:
getSchedulerInstanceId in interface Scheduler
Throws:
SchedulerException

getMetaData

public SchedulerMetaData getMetaData()
                              throws SchedulerException
Description copied from interface: Scheduler

Get a SchedulerMetaData object describing the settings and capabilities of the scheduler instance.

Note that the data returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the meta data values may be different.

Specified by:
getMetaData in interface Scheduler
Throws:
SchedulerException

getContext

public SchedulerContext getContext()
                            throws SchedulerException

Returns the SchedulerContext of the Scheduler.

Specified by:
getContext in interface Scheduler
Throws:
SchedulerException

start

public void start()
           throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
start in interface Scheduler
Throws:
SchedulerException - if shutdown() has been called, or there is an error within the Scheduler.
See Also:
Scheduler.startDelayed(int), Scheduler.standby(), Scheduler.shutdown()

startDelayed

public void startDelayed(int seconds)
                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
startDelayed in interface Scheduler
Throws:
SchedulerException - if shutdown() has been called, or there is an error within the Scheduler.
See Also:
Scheduler.start(), Scheduler.standby(), Scheduler.shutdown()

standby

public void standby()
             throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
standby in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.start(), Scheduler.pauseAll()

isStarted

public boolean isStarted()
                  throws SchedulerException
Whether the scheduler has been started.

Note: This only reflects whether start() has ever been called on this Scheduler, so it will return true even if the Scheduler is currently in standby mode or has been since shutdown.

Specified by:
isStarted in interface Scheduler
Throws:
SchedulerException
See Also:
start(), isShutdown(), isInStandbyMode()

isInStandbyMode

public boolean isInStandbyMode()
                        throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
isInStandbyMode in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.standby(), Scheduler.start()

shutdown

public void shutdown()
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
shutdown in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.shutdown(boolean)

shutdown

public void shutdown(boolean waitForJobsToComplete)
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
shutdown in interface Scheduler
Parameters:
waitForJobsToComplete - if true the scheduler will not allow this method to return until all currently executing jobs have completed.
Throws:
SchedulerException
See Also:
Scheduler.shutdown()

isShutdown

public boolean isShutdown()
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
isShutdown in interface Scheduler
Throws:
SchedulerException

getCurrentlyExecutingJobs

public java.util.List getCurrentlyExecutingJobs()
                                         throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getCurrentlyExecutingJobs in interface Scheduler
Throws:
SchedulerException
See Also:
JobExecutionContext

scheduleJob

public java.util.Date scheduleJob(JobDetail jobDetail,
                                  Trigger trigger)
                           throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
scheduleJob in interface Scheduler
Throws:
SchedulerException - if the Job or Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.

scheduleJob

public java.util.Date scheduleJob(Trigger trigger)
                           throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
scheduleJob in interface Scheduler
Throws:
SchedulerException - if the indicated Job does not exist, or the Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.

addJob

public void addJob(JobDetail jobDetail,
                   boolean replace)
            throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
addJob in interface Scheduler
Throws:
SchedulerException - if there is an internal Scheduler error, or if the Job is not durable, or a Job with the same name already exists, and replace is false.

deleteJob

public boolean deleteJob(java.lang.String jobName,
                         java.lang.String groupName)
                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
deleteJob in interface Scheduler
Returns:
true if the Job was found and deleted.
Throws:
SchedulerException - if there is an internal Scheduler error.

unscheduleJob

public boolean unscheduleJob(java.lang.String triggerName,
                             java.lang.String groupName)
                      throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
unscheduleJob in interface Scheduler
Throws:
SchedulerException

rescheduleJob

public java.util.Date rescheduleJob(java.lang.String triggerName,
                                    java.lang.String groupName,
                                    Trigger newTrigger)
                             throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
rescheduleJob in interface Scheduler
Parameters:
triggerName - The name of the Trigger to be replaced.
groupName - The group name of the Trigger to be replaced.
newTrigger - The new Trigger to be stored.
Returns:
null if a Trigger with the given name & group was not found and removed from the store, otherwise the first fire time of the newly scheduled trigger.
Throws:
SchedulerException

triggerJob

public void triggerJob(java.lang.String jobName,
                       java.lang.String groupName)
                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
triggerJob in interface Scheduler
Throws:
SchedulerException

triggerJob

public void triggerJob(java.lang.String jobName,
                       java.lang.String groupName,
                       JobDataMap data)
                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
triggerJob in interface Scheduler
Parameters:
jobName - the name of the Job to trigger
groupName - the group name of the Job to trigger
data - the (possibly null) JobDataMap to be associated with the trigger that fires the job immediately.
Throws:
SchedulerException

triggerJobWithVolatileTrigger

public void triggerJobWithVolatileTrigger(java.lang.String jobName,
                                          java.lang.String groupName)
                                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
triggerJobWithVolatileTrigger in interface Scheduler
Throws:
SchedulerException

triggerJobWithVolatileTrigger

public void triggerJobWithVolatileTrigger(java.lang.String jobName,
                                          java.lang.String groupName,
                                          JobDataMap data)
                                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
triggerJobWithVolatileTrigger in interface Scheduler
Parameters:
jobName - the name of the Job to trigger
groupName - the group name of the Job to trigger
data - the (possibly null) JobDataMap to be associated with the trigger that fires the job immediately.
Throws:
SchedulerException

pauseTrigger

public void pauseTrigger(java.lang.String triggerName,
                         java.lang.String groupName)
                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseTrigger in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeTrigger(String, String)

pauseTriggerGroup

public void pauseTriggerGroup(java.lang.String groupName)
                       throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseTriggerGroup in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeTriggerGroup(String)

pauseJob

public void pauseJob(java.lang.String jobName,
                     java.lang.String groupName)
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseJob in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeJob(String, String)

pauseJobGroup

public void pauseJobGroup(java.lang.String groupName)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseJobGroup in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeJobGroup(String)

resumeTrigger

public void resumeTrigger(java.lang.String triggerName,
                          java.lang.String groupName)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeTrigger in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseTrigger(String, String)

resumeTriggerGroup

public void resumeTriggerGroup(java.lang.String groupName)
                        throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeTriggerGroup in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseTriggerGroup(String)

resumeJob

public void resumeJob(java.lang.String jobName,
                      java.lang.String groupName)
               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeJob in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseJob(String, String)

resumeJobGroup

public void resumeJobGroup(java.lang.String groupName)
                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeJobGroup in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseJobGroup(String)

pauseAll

public void pauseAll()
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseAll in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeAll(), Scheduler.pauseTriggerGroup(String), Scheduler.standby()

resumeAll

public void resumeAll()
               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeAll in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseAll()

getJobGroupNames

public java.lang.String[] getJobGroupNames()
                                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getJobGroupNames in interface Scheduler
Throws:
SchedulerException

getJobNames

public java.lang.String[] getJobNames(java.lang.String groupName)
                               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getJobNames in interface Scheduler
Throws:
SchedulerException

getTriggersOfJob

public Trigger[] getTriggersOfJob(java.lang.String jobName,
                                  java.lang.String groupName)
                           throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggersOfJob in interface Scheduler
Throws:
SchedulerException

getTriggerGroupNames

public java.lang.String[] getTriggerGroupNames()
                                        throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggerGroupNames in interface Scheduler
Throws:
SchedulerException

getTriggerNames

public java.lang.String[] getTriggerNames(java.lang.String groupName)
                                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggerNames in interface Scheduler
Throws:
SchedulerException

getJobDetail

public JobDetail getJobDetail(java.lang.String jobName,
                              java.lang.String jobGroup)
                       throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getJobDetail in interface Scheduler
Throws:
SchedulerException

getTrigger

public Trigger getTrigger(java.lang.String triggerName,
                          java.lang.String triggerGroup)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTrigger in interface Scheduler
Throws:
SchedulerException

getTriggerState

public int getTriggerState(java.lang.String triggerName,
                           java.lang.String triggerGroup)
                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggerState in interface Scheduler
Throws:
SchedulerException
See Also:
Trigger.STATE_NORMAL, Trigger.STATE_PAUSED, Trigger.STATE_COMPLETE, Trigger.STATE_ERROR, Trigger.STATE_BLOCKED, Trigger.STATE_NONE

addCalendar

public void addCalendar(java.lang.String calName,
                        Calendar calendar,
                        boolean replace,
                        boolean updateTriggers)
                 throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
addCalendar in interface Scheduler
updateTriggers - whether or not to update existing triggers that referenced the already existing calendar so that they are 'correct' based on the new trigger.
Throws:
SchedulerException - if there is an internal Scheduler error, or a Calendar with the same name already exists, and replace is false.

deleteCalendar

public boolean deleteCalendar(java.lang.String calName)
                       throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
deleteCalendar in interface Scheduler
Returns:
true if the Calendar was found and deleted.
Throws:
SchedulerException - if there is an internal Scheduler error.

getCalendar

public Calendar getCalendar(java.lang.String calName)
                     throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getCalendar in interface Scheduler
Throws:
SchedulerException

getCalendarNames

public java.lang.String[] getCalendarNames()
                                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getCalendarNames in interface Scheduler
Throws:
SchedulerException

addGlobalJobListener

public void addGlobalJobListener(JobListener jobListener)
                          throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
addGlobalJobListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addJobListener(JobListener), Scheduler.removeGlobalJobListener(String)

addJobListener

public void addJobListener(JobListener jobListener)
                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
addJobListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addGlobalJobListener(JobListener), Scheduler.removeJobListener(String)

removeGlobalJobListener

public boolean removeGlobalJobListener(java.lang.String name)
                                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
removeGlobalJobListener in interface Scheduler
Returns:
true if the identified listener was found in the list, and removed.
Throws:
SchedulerException
See Also:
Scheduler.addGlobalJobListener(JobListener)

removeJobListener

public boolean removeJobListener(java.lang.String name)
                          throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
removeJobListener in interface Scheduler
Returns:
true if the identified listener was found in the list, and removed.
Throws:
SchedulerException
See Also:
Scheduler.addJobListener(JobListener)

getGlobalJobListeners

public java.util.List getGlobalJobListeners()
                                     throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getGlobalJobListeners in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addGlobalJobListener(JobListener)

getJobListenerNames

public java.util.Set getJobListenerNames()
                                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getJobListenerNames in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addJobListener(JobListener)

getGlobalJobListener

public JobListener getGlobalJobListener(java.lang.String name)
                                 throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getGlobalJobListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addGlobalJobListener(JobListener)

getJobListener

public JobListener getJobListener(java.lang.String name)
                           throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getJobListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addJobListener(JobListener)

addGlobalTriggerListener

public void addGlobalTriggerListener(TriggerListener triggerListener)
                              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
addGlobalTriggerListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addTriggerListener(TriggerListener)

addTriggerListener

public void addTriggerListener(TriggerListener triggerListener)
                        throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
addTriggerListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addGlobalTriggerListener(TriggerListener)

removeGlobalTriggerListener

public boolean removeGlobalTriggerListener(java.lang.String name)
                                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
removeGlobalTriggerListener in interface Scheduler
Returns:
true if the identified listener was found in the list, and removed.
Throws:
SchedulerException
See Also:
Scheduler.addGlobalTriggerListener(TriggerListener)

removeTriggerListener

public boolean removeTriggerListener(java.lang.String name)
                              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
removeTriggerListener in interface Scheduler
Returns:
true if the identified listener was found in the list, and removed.
Throws:
SchedulerException
See Also:
Scheduler.addTriggerListener(TriggerListener)

getGlobalTriggerListeners

public java.util.List getGlobalTriggerListeners()
                                         throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getGlobalTriggerListeners in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addGlobalTriggerListener(TriggerListener)

getTriggerListenerNames

public java.util.Set getTriggerListenerNames()
                                      throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getTriggerListenerNames in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addTriggerListener(TriggerListener)

getGlobalTriggerListener

public TriggerListener getGlobalTriggerListener(java.lang.String name)
                                         throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getGlobalTriggerListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addGlobalTriggerListener(TriggerListener)

getTriggerListener

public TriggerListener getTriggerListener(java.lang.String name)
                                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getTriggerListener in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.addTriggerListener(TriggerListener)

addSchedulerListener

public void addSchedulerListener(SchedulerListener schedulerListener)
                          throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
addSchedulerListener in interface Scheduler
Throws:
SchedulerException

removeSchedulerListener

public boolean removeSchedulerListener(SchedulerListener schedulerListener)
                                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
removeSchedulerListener in interface Scheduler
Returns:
true if the identified listener was found in the list, and removed.
Throws:
SchedulerException

getSchedulerListeners

public java.util.List getSchedulerListeners()
                                     throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getSchedulerListeners in interface Scheduler
Throws:
SchedulerException

getPausedTriggerGroups

public java.util.Set getPausedTriggerGroups()
                                     throws SchedulerException
Description copied from interface: Scheduler

Get the names of all Trigger groups that are paused.

Specified by:
getPausedTriggerGroups in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.getPausedTriggerGroups()

interrupt

public boolean interrupt(java.lang.String jobName,
                         java.lang.String groupName)
                  throws UnableToInterruptJobException
Description copied from interface: Scheduler

Request the interruption, within this Scheduler instance, of all currently executing instances of the identified Job, which must be an implementor of the InterruptableJob interface.

If more than one instance of the identified job is currently executing, the InterruptableJob#interrupt() method will be called on each instance. However, there is a limitation that in the case that interrupt() on one instances throws an exception, all remaining instances (that have not yet been interrupted) will not have their interrupt() method called.

If you wish to interrupt a specific instance of a job (when more than one is executing) you can do so by calling Scheduler.getCurrentlyExecutingJobs() to obtain a handle to the job instance, and then invoke interrupt() on it yourself.

This method is not cluster aware. That is, it will only interrupt instances of the identified InterruptableJob currently executing in this Scheduler instance, not across the entire cluster.

Specified by:
interrupt in interface Scheduler
Returns:
true is at least one instance of the identified job was found and interrupted.
Throws:
UnableToInterruptJobException - if the job does not implement InterruptableJob, or there is an exception while interrupting the job.
See Also:
Scheduler.interrupt(java.lang.String, java.lang.String)

setJobFactory

public void setJobFactory(JobFactory factory)
                   throws SchedulerException
Description copied from interface: Scheduler

Set the JobFactory that will be responsible for producing instances of Job classes.

JobFactories may be of use to those wishing to have their application produce Job instances via some special mechanism, such as to give the opportunity for dependency injection.

Specified by:
setJobFactory in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.setJobFactory(org.quartz.spi.JobFactory)

toBoolean

protected java.lang.Boolean toBoolean(boolean bool)


Copyright 2001-2019, Terracotta, Inc.