インターフェース StepExecutionListener

すべてのスーパーインターフェース:
StepListener
すべての既知の実装クラス:
ChunkMessageChannelItemWriterCompositeStepExecutionListenerExecutionContextPromotionListenerJobParameterExecutionContextCopyListenerMulticasterBatchListenerNoWorkFoundStepExecutionListenerStepExecutionListenerSupportStepExecutionSimpleCompletionPolicyStepListenerSupportSystemCommandTasklet

public interface StepExecutionListener extends StepListener
Step のライフサイクルのリスナーインターフェース。
作成者:
Lucas Ward, Dave Syer, Mahmoud Ben Hassine, Parikshit Dutta
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    default ExitStatus
    afterStep(StepExecution stepExecution)
    リスナーにステップの終了ステータスを変更する機会を与えます。
    default void
    beforeStep(StepExecution stepExecution)
    現在のスコープの StepExecution を使用して、リスナーの状態を初期化します。
  • メソッドの詳細

    • beforeStep

      default void beforeStep(StepExecution stepExecution)
      現在のスコープの StepExecution を使用して、リスナーの状態を初期化します。
      パラメーター:
      stepExecution - StepExecution のインスタンス。
    • afterStep

      @Nullable default ExitStatus afterStep(StepExecution stepExecution)
      リスナーにステップの終了ステータスを変更する機会を与えます。返された値は、ExitStatus.and(ExitStatus) を使用して通常の終了ステータスと結合されます。

      ステップの処理ロジックの実行後に (成功または失敗に関係なく) 呼び出されます。このメソッドで例外をスローしても、ログに記録されるだけなので効果はありません。

      パラメーター:
      stepExecution - StepExecution インスタンス。
      戻り値:
      通常の値と組み合わせる ExitStatus。古い値を変更しない場合は、null (デフォルト) を返します。