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, setJobRepositorypublic JsrStepHandler(JobRepository jobRepository, JobExplorer jobExplorer)
jobRepository - instance of JobRepository.jobExplorer - instance of JobExplorer.public void afterPropertiesSet()
throws java.lang.Exception
SimpleStepHandlerafterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class SimpleStepHandlerjava.lang.ExceptionInitializingBean.afterPropertiesSet()protected boolean shouldStart(StepExecution lastStepExecution, JobExecution jobExecution, Step step) throws JobRestartException, StartLimitExceededException
shouldStart in class SimpleStepHandlerlastStepExecution - the last step executionjobExecution - instance of JobExecutionstep - instance of StepStartLimitExceededException - if the start limit has been exceeded
for this stepJobRestartException - if the job is in an inconsistent state from
an earlier failure