public class JobRunShell extends SchedulerListenerSupport implements Runnable
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.
JobRunShellFactory,
QuartzSchedulerThread,
Job,
Trigger| Modifier and Type | Field and Description |
|---|---|
protected JobExecutionContext |
jec |
protected JobRunShellFactory |
jobRunShellFactory |
protected QuartzScheduler |
qs |
protected SchedulingContext |
schdCtxt |
protected Scheduler |
scheduler |
protected boolean |
shutdownRequested |
| Constructor and Description |
|---|
JobRunShell(JobRunShellFactory jobRunShellFactory,
Scheduler scheduler,
SchedulingContext schdCtxt)
Create a JobRunShell instance with the given settings.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
begin() |
protected void |
complete(boolean successfulExecution) |
boolean |
completeTriggerRetryLoop(Trigger trigger,
JobDetail jobDetail,
int instCode) |
protected org.slf4j.Logger |
getLog()
Get the
for this
class's category. |
void |
initialize(QuartzScheduler qs,
TriggerFiredBundle firedBundle) |
void |
passivate() |
void |
requestShutdown() |
void |
run() |
void |
schedulerShuttingdown()
Called by the
to inform the listener
that it has begun the shutdown process. |
boolean |
vetoedJobRetryLoop(Trigger trigger,
JobDetail jobDetail,
int instCode) |
jobAdded, jobDeleted, jobScheduled, jobsPaused, jobsResumed, jobUnscheduled, schedulerError, schedulerInStandbyMode, schedulerShutdown, schedulerStarted, triggerFinalized, triggersPaused, triggersResumedprotected JobExecutionContext jec
protected QuartzScheduler qs
protected Scheduler scheduler
protected SchedulingContext schdCtxt
protected JobRunShellFactory jobRunShellFactory
protected volatile boolean shutdownRequested
public JobRunShell(JobRunShellFactory jobRunShellFactory, Scheduler scheduler, SchedulingContext schdCtxt)
Create a JobRunShell instance with the given settings.
jobRunShellFactory - A handle to the JobRunShellFactory that produced
this JobRunShell.scheduler - The Scheduler instance that should be made
available within the JobExecutionContext.schdCtxt - the SchedulingContext that should be used by the
JobRunShell when making updates to the JobStore.public void schedulerShuttingdown()
SchedulerListener
Called by the to inform the listener
that it has begun the shutdown process.
Scheduler
schedulerShuttingdown in interface SchedulerListenerschedulerShuttingdown in class SchedulerListenerSupportprotected org.slf4j.Logger getLog()
SchedulerListenerSupportLogger for this
class's category. This should be used by subclasses for logging.getLog in class SchedulerListenerSupportpublic void initialize(QuartzScheduler qs, TriggerFiredBundle firedBundle) throws SchedulerException
SchedulerExceptionpublic void requestShutdown()
protected void begin()
throws SchedulerException
SchedulerExceptionprotected void complete(boolean successfulExecution)
throws SchedulerException
SchedulerExceptionpublic void passivate()
public boolean completeTriggerRetryLoop(Trigger trigger, JobDetail jobDetail, int instCode)
Copyright © 2015. All rights reserved.