Class FlowJob
java.lang.Object
org.springframework.batch.core.job.AbstractJob
org.springframework.batch.core.job.flow.FlowJob
- All Implemented Interfaces:
Job,StepLocator,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
Implementation of the
Job interface that allows for complex flows of steps,
rather than requiring sequential execution. In general, this job implementation was
designed to be used behind a parser, allowing for a namespace to abstract away details.- Since:
- 2.0
- Author:
- Dave Syer, Mahmoud Ben Hassine, Taeik Lim
-
Field Summary
FieldsFields inherited from class org.springframework.batch.core.job.AbstractJob
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(JobExecution execution) Extension point for subclasses allowing them to concentrate on processing logic and ignore listeners and repository calls.Retrieve the step with the given name.Retrieve the step names.voidPublic setter for the flow.Methods inherited from class org.springframework.batch.core.job.AbstractJob
afterPropertiesSet, execute, getDefaultExitStatusForFailure, getJobParametersIncrementer, getJobParametersValidator, getJobRepository, getName, handleStep, isRestartable, registerJobExecutionListener, setBeanName, setJobExecutionListeners, setJobParametersIncrementer, setJobParametersValidator, setJobRepository, setMeterRegistry, setName, setObservationConvention, setObservationRegistry, setRestartable, toString
-
Field Details
-
flow
-
-
Constructor Details
-
Method Details
-
setFlow
Public setter for the flow.- Parameters:
flow- the flow to set
-
getStep
Retrieve the step with the given name. If there is no Step with the given name, then return null.- Specified by:
getStepin interfaceStepLocator- Specified by:
getStepin classAbstractJob- Parameters:
stepName- name of the step- Returns:
- the Step
-
getStepNames
Retrieve the step names.- Specified by:
getStepNamesin interfaceStepLocator- Specified by:
getStepNamesin classAbstractJob- Returns:
- the step names
-
doExecute
Description copied from class:AbstractJobExtension point for subclasses allowing them to concentrate on processing logic and ignore listeners and repository calls. Implementations usually are concerned with the ordering of steps, and delegate actual step processing toAbstractJob.handleStep(Step, JobExecution).- Specified by:
doExecutein classAbstractJob- Parameters:
execution- the currentJobExecution- Throws:
JobExecutionException- to signal a fatal batch framework error (not a business or validation exception)- See Also:
-