Constructor and Description |
---|
CallableTaskletAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Assert that the callable is set.
|
RepeatStatus |
execute(StepContribution contribution,
ChunkContext chunkContext)
Execute the provided Callable and return its
RepeatStatus . |
void |
setCallable(java.util.concurrent.Callable<RepeatStatus> callable)
Public setter for the
Callable . |
public void setCallable(java.util.concurrent.Callable<RepeatStatus> callable)
Callable
.callable
- the Callable
to setpublic void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
InitializingBean.afterPropertiesSet()
@Nullable public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws java.lang.Exception
RepeatStatus
. Ignores
the StepContribution
and the attributes.execute
in interface Tasklet
contribution
- mutable state to be passed back to update the current
step executionchunkContext
- attributes shared between invocations but not between
restartsRepeatStatus
indicating whether processing is
continuable. Returning null
is interpreted as RepeatStatus.FINISHED
java.lang.Exception
- thrown if error occurs during execution.Tasklet.execute(StepContribution, ChunkContext)