public class JsrStepHandler extends SimpleStepHandler
SimpleStepHandler
to apply JSR-352 specific logic for whether to
start a step.Constructor and Description |
---|
JsrStepHandler(JobRepository jobRepository,
JobExplorer jobExplorer) |
Modifier and Type | Method and Description |
---|---|
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.
|
getJobRepository, handleStep, setExecutionContext, setJobRepository
public JsrStepHandler(JobRepository jobRepository, JobExplorer jobExplorer)
jobRepository
- instance of JobRepository
.jobExplorer
- instance of JobExplorer
.public void afterPropertiesSet() throws java.lang.Exception
SimpleStepHandler
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class SimpleStepHandler
java.lang.Exception
InitializingBean.afterPropertiesSet()
protected boolean shouldStart(StepExecution lastStepExecution, JobExecution jobExecution, Step step) throws JobRestartException, StartLimitExceededException
shouldStart
in class SimpleStepHandler
lastStepExecution
- the last step executionjobExecution
- instance of JobExecution
step
- instance of Step
StartLimitExceededException
- if the start limit has been exceeded
for this stepJobRestartException
- if the job is in an inconsistent state from
an earlier failure