クラス SimpleFlow

java.lang.ObjectSE
org.springframework.batch.core.job.flow.support.SimpleFlow
実装されたすべてのインターフェース:
Floworg.springframework.beans.factory.InitializingBean

public class SimpleFlow extends ObjectSE implements Flow, org.springframework.beans.factory.InitializingBean
最後の State の終了ステータスに応じて条件付きでブランチになる Flow。入力パラメーターは状態遷移です(順不同)。開始状態の名前は、明示的に指定することができ(遷移のセットに存在する必要があります)、あいまいでない場合は既存の遷移から計算できます。
導入:
2.0
作成者:
Dave Syer, Michael Minella, Mahmoud Ben Hassine, Taeik Lim
  • コンストラクターの詳細

    • SimpleFlow

      public SimpleFlow(StringSE name)
      指定された名前でフローを作成します。
      パラメーター:
      name - フローの名前
  • メソッドの詳細

    • setStateTransitionComparator

      public void setStateTransitionComparator(ComparatorSE<StateTransition> stateTransitionComparator)
    • getStartState

      public State getStartState()
    • getName

      public StringSE getName()
      このフローの名前を取得します。
      次で指定:
      インターフェース FlowgetName 
      戻り値:
      フローの名前
      関連事項:
    • setStateTransitions

      public void setStateTransitions(ListSE<StateTransition> stateTransitions)
      stateTransitions のパブリック setter。
      パラメーター:
      stateTransitions - 設定する stateTransitions
    • getState

      public State getState(StringSE stateName)
      指定された名前の状態を取得します。指定された名前の状態がない場合は、null を返します。
      次で指定:
      インターフェース FlowgetState 
      パラメーター:
      stateName - 取得する状態の名前
      戻り値:
      状態
    • getStates

      public CollectionSE<State> getStates()
      このフローの状態を調査する必要があるクライアントのための便利なアクセサー。
      次で指定:
      インターフェース FlowgetStates 
      戻り値:
      状態
    • afterPropertiesSet

      public void afterPropertiesSet() throws ExceptionSE
      開始状態を特定し、実行に必要なデータ構造を事前に入力します。
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
      例外:
      ExceptionSE
      関連事項:
      • InitializingBean.afterPropertiesSet()
    • start

      public FlowExecution start(FlowExecutor executor) throws FlowExecutionException
      次で指定:
      インターフェース Flowstart 
      パラメーター:
      executor - フローの実行に使用する FlowExecutor インスタンス。
      戻り値:
      フローの終了ステータスを含む FlowExecution
      例外:
      FlowExecutionException - フローの実行中にエラーが発生した場合にスローされます。
      関連事項:
    • resume

      public FlowExecution resume(StringSE stateName, FlowExecutor executor) throws FlowExecutionException
      次で指定:
      インターフェース Flowresume 
      パラメーター:
      stateName - 再開する状態の名前。
      executor - 実行される各状態に渡されるコンテキスト。
      戻り値:
      フローの終了ステータスを含む FlowExecution
      例外:
      FlowExecutionException - フローの実行中にエラーが発生した場合にスローされます。
      関連事項:
    • getTransitionMap

      protected MapSE<StringSE,SetSE<StateTransition>> getTransitionMap()
    • getStateMap

      protected MapSE<StringSE,State> getStateMap()
    • nextState

      protected State nextState(StringSE stateName, FlowExecutionStatus status, StepExecution stepExecution) throws FlowExecutionException
      パラメーター:
      stateName - 次の状態の名前。
      status - FlowExecutionStatus インスタンス。
      stepExecution - StepExecution インスタンス。
      戻り値:
      次の Step (これで終わりの場合は null)
      例外:
      FlowExecutionException - nextState 処理中にエラーが発生した場合にスローされます。
    • isFlowContinued

      protected boolean isFlowContinued(State state, FlowExecutionStatus status, StepExecution stepExecution)