类 FlowBuilder<Q>

  • 类型参数:
    Q - the type of object returned by the builder (by default a Flow)
    直接已知子类:
    JobFlowBuilder

    public class FlowBuilder<Q>
    extends java.lang.Object
    A builder for a flow of steps that can be executed as a job or as part of a job. Steps can be linked together with conditional transitions that depend on the exit status of the previous step.
    从以下版本开始:
    2.2
    作者:
    Dave Syer, Michael Minella
    • 构造器详细资料

      • FlowBuilder

        public FlowBuilder​(java.lang.String name)
    • 方法详细资料

      • build

        public Q build()
        Validate the current state of the builder and build a flow. Subclasses may override this to build an object of a different type that itself depends on the flow.
        返回:
        a flow
      • next

        public FlowBuilder<Qnext​(Step step)
        Transition to the next step on successful completion of the current step. All other outcomes are treated as failures.
        参数:
        step - the next step
        返回:
        this to enable chaining
      • start

        public FlowBuilder<Qstart​(Step step)
        Start a flow. If some steps are already registered, just a synonym for from(Step).
        参数:
        step - the step to start with
        返回:
        this to enable chaining
      • from

        public FlowBuilder<Qfrom​(Step step)
        Go back to a previously registered step and start a new path. If no steps are registered yet just a synonym for start(Step).
        参数:
        step - the step to start from (already registered)
        返回:
        this to enable chaining
      • next

        public FlowBuilder.UnterminatedFlowBuilder<Qnext​(JobExecutionDecider decider)
        Transition to the decider on successful completion of the current step. All other outcomes are treated as failures.
        参数:
        decider - the JobExecutionDecider to determine the next step to execute
        返回:
        this to enable chaining
      • next

        public FlowBuilder<Qnext​(Flow flow)
        Go next on successful completion to a subflow.
        参数:
        flow - the flow to go to
        返回:
        a builder to enable chaining
      • from

        public FlowBuilder<Qfrom​(Flow flow)
        Start again from a subflow that was already registered.
        参数:
        flow - the flow to start from (already registered)
        返回:
        a builder to enable chaining
      • start

        public FlowBuilder<Qstart​(Flow flow)
        If a flow should start with a subflow use this as the first state.
        参数:
        flow - the flow to start from
        返回:
        a builder to enable chaining
      • split

        public FlowBuilder.SplitBuilder<Qsplit​(org.springframework.core.task.TaskExecutor executor)
        参数:
        executor - a task executor to execute the split flows
        返回:
        a builder to enable fluent chaining
      • on

        public FlowBuilder.TransitionBuilder<Qon​(java.lang.String pattern)
        Start a transition to a new state if the exit status from the previous state matches the pattern given. Successful completion normally results in an exit status equal to (or starting with by convention) "COMPLETED". See ExitStatus for commonly used values.
        参数:
        pattern - the pattern of exit status on which to take this transition
        返回:
        a builder to enable fluent chaining
      • end

        public final Q end()
        A synonym for build() which callers might find useful. Subclasses can override build to create an object of the desired type (e.g. a parent builder or an actual flow).
        返回:
        the result of the builder
      • stop

        protected void stop​(java.lang.String pattern)
      • stop

        protected void stop​(java.lang.String pattern,
                            State restart)