クラス SimpleStepHandler

java.lang.ObjectSE
org.springframework.batch.core.job.SimpleStepHandler
実装済みのインターフェース一覧:
StepHandlerorg.springframework.beans.factory.InitializingBean

public class SimpleStepHandler extends ObjectSE implements StepHandler, org.springframework.beans.factory.InitializingBean
リポジトリを管理し、関心事を再起動する StepHandler の実装。
作成者:
Dave Syer
  • コンストラクターの詳細

    • SimpleStepHandler

      public SimpleStepHandler()
      構成を使用するための便利なデフォルトコンストラクター。
    • SimpleStepHandler

      public SimpleStepHandler(JobRepository jobRepository)
      パラメーター:
      jobRepository - JobRepository
    • SimpleStepHandler

      public SimpleStepHandler(JobRepository jobRepository, ExecutionContext executionContext)
      パラメーター:
      jobRepository - JobRepository
      executionContext - 現在のステップの ExecutionContext
  • 方法の詳細

    • afterPropertiesSet

      public void afterPropertiesSet() throws ExceptionSE
      必須プロパティ (jobRepository) を確認します。
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBean 内の afterPropertiesSet 
      例外:
      ExceptionSE
      関連事項:
      • InitializingBean.afterPropertiesSet()
    • getJobRepository

      protected JobRepository getJobRepository()
      戻り値:
      中古 jobRepository
    • setJobRepository

      public void setJobRepository(JobRepository jobRepository)
      パラメーター:
      jobRepository - 設定する jobRepository
    • setExecutionContext

      public void setExecutionContext(ExecutionContext executionContext)
      処理される前にステップ実行に追加される値を含むコンテキスト。
      パラメーター:
      executionContext - 設定する実行コンテキスト
    • handleStep

      インターフェースからコピーされた説明: StepHandler
      ステップを処理し、その実行を返します。JobExecution は保存されませんが、必要に応じて StepExecution の永続性を管理する必要があります(たとえば、ステップを実行する前に、少なくともリポジトリに追加する必要があります)。
      次で指定:
      インターフェース StepHandler 内の handleStep 
      パラメーター:
      step - Step
      execution - JobExecution
      戻り値:
      ステップの実行
      例外:
      JobInterruptedException - 中断がある場合
      JobRestartException - 失敗したステップの再開に問題がある場合
      StartLimitExceededException - ステップが開始制限を超えた場合
      関連事項:
    • shouldStart

      protected boolean shouldStart(StepExecution lastStepExecution, JobExecution jobExecution, Step step) throws JobRestartException, StartLimitExceededException
      ステップと構成を指定して、ステップを開始する必要がある場合は true を返し、開始しない場合は false を返し、ジョブを終了する必要がある場合は例外をスローします。
      パラメーター:
      lastStepExecution - 最後のステップの実行
      jobExecution - 評価される JobExecution インスタンス。
      step - 評価される Step インスタンス。
      戻り値:
      ステップを開始する必要がある場合は true、開始しない場合は false。
      例外:
      StartLimitExceededException - このステップの開始制限を超えている場合
      JobRestartException - ジョブが以前の失敗と矛盾した状態にある場合