Class CallableTaskletAdapter
- java.lang.Object
- org.springframework.batch.core.step.tasklet.CallableTaskletAdapter
Constructor Summary
Constructors Constructor Description CallableTaskletAdapter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Assert that the callable is set.RepeatStatus
execute(StepContribution contribution, ChunkContext chunkContext)
Execute the provided Callable and return itsRepeatStatus
.void
setCallable(java.util.concurrent.Callable<RepeatStatus> callable)
Public setter for theCallable
.
Method Detail
setCallable
public void setCallable(java.util.concurrent.Callable<RepeatStatus> callable)
Public setter for theCallable
.- Parameters:
callable
- theCallable
to set
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
Assert that the callable is set.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- See Also:
InitializingBean.afterPropertiesSet()
execute
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws java.lang.Exception
Execute the provided Callable and return itsRepeatStatus
. Ignores theStepContribution
and the attributes.- Specified by:
execute
in interfaceTasklet
- 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.- See Also:
Tasklet.execute(StepContribution, ChunkContext)