com.atlassian.scheduler.core
Class JobLauncher
java.lang.Object
com.atlassian.scheduler.core.JobLauncher
public class JobLauncher
- extends Object
Scheduler implementations can (and should) use JobLauncher to invoke jobs when
it is time to run them. It will do the necessary checks to make sure that the job runner
is registered, has the appropriate run mode, can reconstruct the job's parameter map, and
so on. If everything checks out, it calls the job runner's
runJob method and records the
the resulting RunDetails using
addRunDetails.
- Since:
- v1.0
|
Method Summary |
void |
launch()
Call this to validate the job, run it, and update its status. |
String |
toString()
|
LOG
protected static final org.slf4j.Logger LOG
schedulerService
protected final AbstractSchedulerService schedulerService
schedulerRunMode
protected final RunMode schedulerRunMode
firedAt
protected final Date firedAt
jobId
protected final JobId jobId
JobLauncher
public JobLauncher(AbstractSchedulerService schedulerService,
RunMode schedulerRunMode,
Date firedAt,
JobId jobId)
- Creates a job launcher to handle the running of a scheduled job.
- Parameters:
schedulerService - the scheduler that is invoking the jobschedulerRunMode - the expected run mode for the jobs that this scheduler ownsfiredAt - the time that the job was started, if known; may be null, in which case the
current time is usedjobId - the job ID of the job to run
launch
public void launch()
- Call this to validate the job, run it, and update its status.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014 Atlassian. All Rights Reserved.