类 JsrStepHandler
- java.lang.Object
- org.springframework.batch.core.job.SimpleStepHandler
- org.springframework.batch.core.jsr.job.JsrStepHandler
- 所有已实现的接口:
StepHandler
,org.springframework.beans.factory.InitializingBean
public class JsrStepHandler extends SimpleStepHandler
ExtendsSimpleStepHandler
to apply JSR-352 specific logic for whether to start a step.- 从以下版本开始:
- 3.0
- 作者:
- Michael Minella
构造器概要
构造器 构造器 说明 JsrStepHandler(JobRepository jobRepository, JobExplorer jobExplorer)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Check mandatory properties (jobRepository).protected boolean
shouldStart(StepExecution lastStepExecution, JobExecution jobExecution, Step step)
Given a step and configuration, return true if the step should start, false if it should not, and throw an exception if the job should finish.从类继承的方法 org.springframework.batch.core.job.SimpleStepHandler
getJobRepository, handleStep, setExecutionContext, setJobRepository
构造器详细资料
JsrStepHandler
public JsrStepHandler(JobRepository jobRepository, JobExplorer jobExplorer)
- 参数:
jobRepository
- instance ofJobRepository
.jobExplorer
- instance ofJobExplorer
.
方法详细资料
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
从类复制的说明:SimpleStepHandler
Check mandatory properties (jobRepository).- 指定者:
afterPropertiesSet
在接口中org.springframework.beans.factory.InitializingBean
- 覆盖:
afterPropertiesSet
在类中SimpleStepHandler
- 抛出:
java.lang.Exception
- 另请参阅:
InitializingBean.afterPropertiesSet()
shouldStart
protected boolean shouldStart(StepExecution lastStepExecution, JobExecution jobExecution, Step step) throws JobRestartException, StartLimitExceededException
Given a step and configuration, return true if the step should start, false if it should not, and throw an exception if the job should finish.- 覆盖:
shouldStart
在类中SimpleStepHandler
- 参数:
lastStepExecution
- the last step executionjobExecution
- instance ofJobExecution
step
- instance ofStep
- 返回:
- true if step should start, false if it should not.
- 抛出:
StartLimitExceededException
- if the start limit has been exceeded for this stepJobRestartException
- if the job is in an inconsistent state from an earlier failure