Class FlowJobBuilder
- java.lang.Object
- org.springframework.batch.core.job.builder.JobBuilderHelper<FlowJobBuilder>
- org.springframework.batch.core.job.builder.FlowJobBuilder
public class FlowJobBuilder extends JobBuilderHelper<FlowJobBuilder>
A job builder forFlowJob
instances. A flow job delegates processing to a nested flow composed of steps and conditional transitions between steps.- Since:
- 2.2
- Author:
- Dave Syer
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper
JobBuilderHelper.CommonJobProperties
Field Summary
Fields inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper
logger
Constructor Summary
Constructors Constructor Description FlowJobBuilder(JobBuilderHelper<?> parent)
Create a new builder initialized with any properties in the parent.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Job
build()
Build a job that executes the flow provided, normally composed of other steps.protected FlowJobBuilder
flow(Flow flow)
Provide a single flow to execute as the job.JobFlowBuilder
start(Flow flow)
Start a job with this flow, but expect to transition from there to other flows or steps.JobFlowBuilder
start(Step step)
Start a job with this step, but expect to transition from there to other flows or steps.Methods inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper
enhance, getJobRepository, getName, incrementer, isRestartable, listener, preventRestart, repository, validator
Constructor Detail
FlowJobBuilder
public FlowJobBuilder(JobBuilderHelper<?> parent)
Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.- Parameters:
parent
- a parent helper containing common job properties
Method Detail
start
public JobFlowBuilder start(Flow flow)
Start a job with this flow, but expect to transition from there to other flows or steps.- Parameters:
flow
- the flow to start with- Returns:
- a builder to enable fluent chaining
start
public JobFlowBuilder start(Step step)
Start a job with this step, but expect to transition from there to other flows or steps.- Parameters:
step
- the step to start with- Returns:
- a builder to enable fluent chaining
flow
protected FlowJobBuilder flow(Flow flow)
Provide a single flow to execute as the job.- Parameters:
flow
- the flow to execute- Returns:
- this for fluent chaining
build
public Job build()
Build a job that executes the flow provided, normally composed of other steps.- Returns:
- a flow job