public class JobRunShell extends Object implements Runnable, ISchedulerListener
JobRunShell instances are responsible for providing the 'safe' environment
for Job s to run in, and for performing all of the work of
executing the Job, catching ANY thrown exceptions, updating the
Trigger with the Job's completion code, etc.
A JobRunShell instance is created by a
JobRunShellFactory on behalf of the
QuartzSchedulerThread which then runs the shell in a thread from
the configured ThreadPool when the scheduler determines that a
Job has been triggered.
IJobRunShellFactory,
QuartzSchedulerThread,
IJob,
ITrigger| Modifier and Type | Field and Description |
|---|---|
protected TriggerFiredBundle |
m_aFiredTriggerBundle |
protected JobExecutionContext |
m_aJEC |
protected QuartzScheduler |
m_aQS |
protected IScheduler |
m_aScheduler |
protected boolean |
m_bShutdownRequested |
| Constructor and Description |
|---|
JobRunShell(IScheduler scheduler,
TriggerFiredBundle bndle)
Create a JobRunShell instance with the given settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
begin() |
protected void |
complete(boolean successfulExecution) |
void |
initialize(QuartzScheduler sched) |
void |
passivate() |
void |
requestShutdown() |
void |
run() |
void |
schedulerShuttingdown()
Called by the
to inform the listener that
it has begun the shutdown sequence. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitjobAdded, jobDeleted, jobPaused, jobResumed, jobScheduled, jobsPaused, jobsResumed, jobUnscheduled, schedulerError, schedulerInStandbyMode, schedulerShutdown, schedulerStarted, schedulerStarting, schedulingDataCleared, triggerFinalized, triggerPaused, triggerResumed, triggersPaused, triggersResumedprotected JobExecutionContext m_aJEC
protected QuartzScheduler m_aQS
protected TriggerFiredBundle m_aFiredTriggerBundle
protected IScheduler m_aScheduler
protected volatile boolean m_bShutdownRequested
public JobRunShell(IScheduler scheduler, TriggerFiredBundle bndle)
Create a JobRunShell instance with the given settings.
scheduler - The Scheduler instance that should be made available
within the JobExecutionContext.public void schedulerShuttingdown()
ISchedulerListenerIScheduler to inform the listener that
it has begun the shutdown sequence.schedulerShuttingdown in interface ISchedulerListenerpublic void initialize(QuartzScheduler sched) throws SchedulerException
SchedulerExceptionpublic void requestShutdown()
protected void begin()
throws SchedulerException
SchedulerException - on errorprotected void complete(boolean successfulExecution)
throws SchedulerException
successfulExecution - SchedulerExceptionpublic void passivate()
Copyright © 2016–2021 Philip Helger. All rights reserved.