public class JobInterruptMonitorPlugin extends TriggerListenerSupport implements SchedulerPlugin
org.quartz.Scheduler#interrupt()| Modifier and Type | Field and Description | 
|---|---|
static String | 
AUTO_INTERRUPTIBLE  | 
static String | 
MAX_RUN_TIME  | 
| Constructor and Description | 
|---|
JobInterruptMonitorPlugin()  | 
| Modifier and Type | Method and Description | 
|---|---|
long | 
getDefaultMaxRunTime()  | 
protected org.slf4j.Logger | 
getLog()
Get the  
 for this
 class's category. | 
String | 
getName()
 Get the name of the  
TriggerListener. | 
void | 
initialize(String name,
          Scheduler scheduler,
          ClassLoadHelper helper)
 Called during creation of the  
Scheduler in order to give
 the SchedulerPlugin a chance to initialize. | 
ScheduledFuture | 
scheduleJobInterruptMonitor(JobKey jobkey,
                           long delay)  | 
void | 
setDefaultMaxRunTime(long defaultMaxRunTime)  | 
void | 
shutdown()
 Called in order to inform the  
SchedulerPlugin that it
 should free up all of it's resources because the scheduler is shutting
 down. | 
void | 
start()
 Called when the associated  
Scheduler is started, in order
 to let the plug-in know it can now make calls into the scheduler if it
 needs to. | 
void | 
triggerComplete(Trigger trigger,
               JobExecutionContext context,
               Trigger.CompletedExecutionInstruction triggerInstructionCode)
 | 
void | 
triggerFired(Trigger trigger,
            JobExecutionContext context)
 | 
triggerMisfired, vetoJobExecutionpublic static final String AUTO_INTERRUPTIBLE
public static final String MAX_RUN_TIME
public void start()
SchedulerPlugin
 Called when the associated Scheduler is started, in order
 to let the plug-in know it can now make calls into the scheduler if it
 needs to.
 
start in interface SchedulerPluginpublic void shutdown()
SchedulerPlugin
 Called in order to inform the SchedulerPlugin that it
 should free up all of it's resources because the scheduler is shutting
 down.
 
shutdown in interface SchedulerPluginprotected org.slf4j.Logger getLog()
TriggerListenerSupportLogger for this
 class's category.  This should be used by subclasses for logging.getLog in class TriggerListenerSupportpublic ScheduledFuture scheduleJobInterruptMonitor(JobKey jobkey, long delay)
public long getDefaultMaxRunTime()
public void setDefaultMaxRunTime(long defaultMaxRunTime)
public String getName()
TriggerListener
 Get the name of the TriggerListener.
 
getName in interface TriggerListenerpublic void triggerFired(Trigger trigger, JobExecutionContext context)
TriggerListener
 Called by the  when a Scheduler
 has fired, and it's associated Trigger
 is about to be executed.
 JobDetail
 It is called before the vetoJobExecution(..) method of this
 interface.
 
triggerFired in interface TriggerListenertriggerFired in class TriggerListenerSupporttrigger - The Trigger that has fired.context - The JobExecutionContext that will be passed to
          the Job'sexecute(xx) method.public void triggerComplete(Trigger trigger, JobExecutionContext context, Trigger.CompletedExecutionInstruction triggerInstructionCode)
TriggerListener
 Called by the  when a Scheduler
 has fired, it's associated Trigger
 has been executed, and it's JobDetailtriggered(xx) method has been
 called.
 
triggerComplete in interface TriggerListenertriggerComplete in class TriggerListenerSupporttrigger - The Trigger that was fired.context - The JobExecutionContext that was passed to the
          Job'sexecute(xx) method.triggerInstructionCode - the result of the call on the Trigger'striggered(xx)
          method.public void initialize(String name, Scheduler scheduler, ClassLoadHelper helper) throws SchedulerException
SchedulerPlugin
 Called during creation of the Scheduler in order to give
 the SchedulerPlugin a chance to initialize.
 
 At this point, the Scheduler's JobStore is not yet
 initialized.
 
 If you need direct access your plugin, for example during Job
 execution, you can have this method explicitly put a 
 reference to this plugin in the Scheduler's 
 SchedulerContext.
 
initialize in interface SchedulerPluginname - The name by which the plugin is identified.scheduler - The scheduler to which the plugin is registered.helper - The classLoadHelper the SchedulerFactory is
            actually usingSchedulerConfigException - if there is an error initializing.SchedulerExceptionCopyright 2001-2019, Terracotta, Inc.