|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.job.AbstractJob
public abstract class AbstractJob
Batch domain object representing a job. Job is an explicit abstraction representing the configuration of a job specified by a developer. It should be noted that restart policy is applied to the job as a whole and not to a step.
Constructor Summary | |
---|---|
AbstractJob()
Default constructor. |
|
AbstractJob(String name)
Convenience constructor to immediately add name (which is mandatory but not final). |
Method Summary | |
---|---|
void |
addStep(Step step)
|
void |
afterPropertiesSet()
|
protected CompositeExecutionJobListener |
getCompositeListener()
|
protected JobRepository |
getJobRepository()
|
String |
getName()
|
List |
getSteps()
|
boolean |
isRestartable()
|
void |
registerJobExecutionListener(JobExecutionListener listener)
Register a single listener for the JobExecutionListener
callbacks. |
void |
setBeanName(String name)
Set the name property if it is not already set. |
void |
setJobExecutionListeners(JobExecutionListener[] listeners)
Public setter for injecting JobExecutionListener s. |
void |
setJobRepository(JobRepository jobRepository)
Public setter for the JobRepository that is needed to manage the
state of the batch meta domain (jobs, steps, executions) during the life
of a job. |
void |
setName(String name)
Set the name property. |
void |
setRestartable(boolean restartable)
|
void |
setSteps(List steps)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.batch.core.Job |
---|
execute |
Constructor Detail |
---|
public AbstractJob()
public AbstractJob(String name)
name
- Method Detail |
---|
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
BeanNameAware.setBeanName(java.lang.String)
public void setName(String name)
setBeanName(java.lang.String)
public String getName()
getName
in interface Job
public List getSteps()
getSteps
in interface Job
Step
s executed as part of this job.public void setSteps(List steps)
public void addStep(Step step)
public void setRestartable(boolean restartable)
public boolean isRestartable()
isRestartable
in interface Job
public String toString()
toString
in class Object
public void setJobExecutionListeners(JobExecutionListener[] listeners)
JobExecutionListener
s. They will all
be given the listener callbacks at the appropriate point in the job.
listeners
- the listeners to set.public void registerJobExecutionListener(JobExecutionListener listener)
JobExecutionListener
callbacks.
listener
- a JobExecutionListener
public void setJobRepository(JobRepository jobRepository)
JobRepository
that is needed to manage the
state of the batch meta domain (jobs, steps, executions) during the life
of a job.
jobRepository
- public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected JobRepository getJobRepository()
protected CompositeExecutionJobListener getCompositeListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |