Modifier and Type | Field and Description |
---|---|
private JobDescription |
description |
private Exception |
error |
private Set<JobStateListener> |
listeners |
protected static org.slf4j.Logger |
logger |
private JobState |
state |
Constructor and Description |
---|
JobCpi(JobDescription description,
JobStateListener listener) |
Modifier and Type | Method and Description |
---|---|
Exception |
getError()
In case of an error while running a job, this function will return the
error.
|
JobDescription |
getJobDescription()
Returns the
JobDescription that was used to create this Job. |
JobState |
getState()
This method returns the state of the Job.
|
boolean |
isDone() |
void |
registerStateLister(JobStateListener listener)
Register a state listener for this job.
|
protected void |
setError(Exception error) |
void |
unRegisterStateLister(JobStateListener listener) |
protected void |
updateState(JobState state) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExitStatus, kill
protected static org.slf4j.Logger logger
private final JobDescription description
private JobState state
private final Set<JobStateListener> listeners
private Exception error
public JobCpi(JobDescription description, JobStateListener listener)
public JobDescription getJobDescription()
Job
JobDescription
that was used to create this Job.getJobDescription
in interface Job
public JobState getState()
Job
protected void updateState(JobState state)
public void registerStateLister(JobStateListener listener)
Job
registerStateLister
in interface Job
public void unRegisterStateLister(JobStateListener listener)
unRegisterStateLister
in interface Job
public Exception getError()
Job
protected void setError(Exception error)