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
Fields inherited from class org.springframework.batch.core.job.AbstractJob
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doExecute
(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.void
Public 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:
getStep
in interfaceStepLocator
- Specified by:
getStep
in classAbstractJob
- Parameters:
stepName
- name of the step- Returns:
- the Step
-
getStepNames
Retrieve the step names.- Specified by:
getStepNames
in interfaceStepLocator
- Specified by:
getStepNames
in classAbstractJob
- Returns:
- the step names
-
doExecute
Description copied from class:AbstractJob
Extension 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:
doExecute
in classAbstractJob
- Parameters:
execution
- the currentJobExecution
- Throws:
JobExecutionException
- to signal a fatal batch framework error (not a business or validation exception)- See Also:
-