Interface Tasklet
- All Known Subinterfaces:
StoppableTasklet
- All Known Implementing Classes:
BatchletAdapter
,CallableTaskletAdapter
,ChunkOrientedTasklet
,JsrSampleTasklet
,MethodInvokingTaskletAdapter
,SleepingTasklet
,SystemCommandTasklet
public interface Tasklet
Strategy for processing in a step.- Author:
- Dave Syer, Mahmoud Ben Hassine
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RepeatStatus
execute(StepContribution contribution, ChunkContext chunkContext)
Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction.
Method Detail
execute
@Nullable RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws java.lang.Exception
Given the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction. Implementations returnRepeatStatus.FINISHED
if finished. If not they returnRepeatStatus.CONTINUABLE
. On failure throws an exception.- Parameters:
contribution
- mutable state to be passed back to update the current step executionchunkContext
- attributes shared between invocations but not between restarts- Returns:
- an
RepeatStatus
indicating whether processing is continuable. Returningnull
is interpreted asRepeatStatus.FINISHED
- Throws:
java.lang.Exception
- thrown if error occurs during execution.