类 CallableTaskletAdapter
- java.lang.Object
- org.springframework.batch.core.step.tasklet.CallableTaskletAdapter
- 所有已实现的接口:
Tasklet
,org.springframework.beans.factory.InitializingBean
public class CallableTaskletAdapter extends java.lang.Object implements Tasklet, org.springframework.beans.factory.InitializingBean
- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 CallableTaskletAdapter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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
.
构造器详细资料
CallableTaskletAdapter
public CallableTaskletAdapter()
方法详细资料
setCallable
public void setCallable(java.util.concurrent.Callable<RepeatStatus> callable)
Public setter for theCallable
.- 参数:
callable
- theCallable
to set
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
Assert that the callable is set.- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 抛出:
java.lang.Exception
- 另请参阅:
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.- 指定者:
execute
在接口中Tasklet
- 参数:
contribution
- mutable state to be passed back to update the current step executionchunkContext
- attributes shared between invocations but not between restarts- 返回:
- an
RepeatStatus
indicating whether processing is continuable. Returningnull
is interpreted asRepeatStatus.FINISHED
- 抛出:
java.lang.Exception
- thrown if error occurs during execution.- 另请参阅:
Tasklet.execute(StepContribution, ChunkContext)