public abstract class Job extends Object
Constructor and Description |
---|
Job() |
Modifier and Type | Method and Description |
---|---|
static String |
computeTrackingId(ExecutionContext context)
Computes the tracking ID for script-less job.
|
static String |
computeTrackingId(ExecutionContext context,
ExecutionScript script)
Computes the tracking ID.
|
protected abstract void |
execute(ExecutionMonitor monitor,
ExecutionContext context)
Executes this job.
|
abstract Set<String> |
getBlockerIds()
Returns job IDs which blocks executing this job.
|
abstract String |
getId()
Returns the ID of this job for other succeeding jobs.
|
abstract String |
getJobLabel()
Returns the target job label.
|
abstract String |
getResourceId(ExecutionContext context)
Returns the resource ID which this job requires in execution.
|
abstract String |
getServiceLabel()
Returns the service label which actually executes this job.
|
String |
getTrackingId(ExecutionContext context)
Returns the tracking ID of this job.
|
void |
launch(ExecutionMonitor monitor,
ExecutionContext context)
Executes this job.
|
public final void launch(ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException
monitor
- a progress monitor for this jobcontext
- current execution contextInterruptedException
- if this execution is interruptedIOException
- if failed to execute this jobIllegalArgumentException
- if some parameters were null
protected abstract void execute(ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException
monitor
- a progress monitor for this jobcontext
- current execution contextInterruptedException
- if this execution is interruptedIOException
- if failed to execute this jobpublic abstract String getJobLabel()
public abstract String getServiceLabel()
public abstract String getId()
public String getTrackingId(ExecutionContext context)
context
- current execution contextpublic static String computeTrackingId(ExecutionContext context, ExecutionScript script)
context
- target contextscript
- target scriptpublic static String computeTrackingId(ExecutionContext context)
context
- target contextpublic abstract Set<String> getBlockerIds()
public abstract String getResourceId(ExecutionContext context) throws InterruptedException, IOException
context
- current execution contextInterruptedException
- if this execution is interruptedIOException
- if failed to execute this jobCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.