Class JsrSampleTasklet
- java.lang.Object
- org.springframework.batch.sample.jsr352.JsrSampleTasklet
Constructor Summary
Constructors Constructor Description JsrSampleTasklet()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepeatStatusexecute(StepContribution stepContribution, 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
public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws java.lang.Exception
Description copied from interface:TaskletGiven the current context in the form of a step contribution, do whatever is necessary to process this unit inside a transaction. Implementations returnRepeatStatus.FINISHEDif finished. If not they returnRepeatStatus.CONTINUABLE. On failure throws an exception.- Specified by:
executein interfaceTasklet- Parameters:
stepContribution- mutable state to be passed back to update the current step executionchunkContext- attributes shared between invocations but not between restarts- Returns:
- an
RepeatStatusindicating whether processing is continuable. Returningnullis interpreted asRepeatStatus.FINISHED - Throws:
java.lang.Exception- thrown if error occurs during execution.