|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.step.AbstractStep org.springframework.batch.core.step.tasklet.TaskletStep
public class TaskletStep
A Step
that executes a Tasklet
directly. This step does not
manage transactions or any looping functionality. The tasklet should do this
on its own.
If the Tasklet
itself implements StepExecutionListener
it
will be registered automatically, but its injected dependencies will not be.
This is a good way to get access to job parameters and execution context if
the tasklet is parameterized.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.batch.core.step.AbstractStep |
---|
AbstractStep.FatalException |
Field Summary |
---|
Fields inherited from class org.springframework.batch.core.step.AbstractStep |
---|
JOB_INTERRUPTED |
Constructor Summary | |
---|---|
TaskletStep()
Default constructor is useful for XML configuration. |
|
TaskletStep(Tasklet tasklet,
JobRepository jobRepository)
Creates a new Step for executing a Tasklet |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Check mandatory properties. |
protected void |
close(ExecutionContext ctx)
|
protected ExitStatus |
doExecute(StepExecution stepExecution)
Delegate to tasklet. |
protected void |
open(ExecutionContext ctx)
|
void |
setStepListeners(StepExecutionListener[] listeners)
Deprecated. use AbstractStep.setStepExecutionListeners(StepExecutionListener[]) instead |
void |
setTasklet(Tasklet tasklet)
Public setter for the Tasklet . |
Methods inherited from class org.springframework.batch.core.step.AbstractStep |
---|
execute, getCompositeListener, getJobRepository, getName, getStartLimit, isAllowStartIfComplete, registerStepExecutionListener, setAllowStartIfComplete, setBeanName, setJobRepository, setName, setStartLimit, setStepExecutionListeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskletStep()
public TaskletStep(Tasklet tasklet, JobRepository jobRepository)
Step
for executing a Tasklet
tasklet
- The Tasklet
to executejobRepository
- The JobRepository
to use for
persistence of incremental stateMethod Detail |
---|
public void setStepListeners(StepExecutionListener[] listeners)
AbstractStep.setStepExecutionListeners(StepExecutionListener[])
instead
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
afterPropertiesSet
in class AbstractStep
Exception
InitializingBean.afterPropertiesSet()
public void setTasklet(Tasklet tasklet)
Tasklet
.
tasklet
- the Tasklet
to setprotected ExitStatus doExecute(StepExecution stepExecution) throws Exception
doExecute
in class AbstractStep
Exception
protected void close(ExecutionContext ctx) throws Exception
close
in class AbstractStep
Exception
protected void open(ExecutionContext ctx) throws Exception
open
in class AbstractStep
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |