インターフェース StepExecutionListener
- すべてのスーパーインターフェース:
StepListener
- すべての既知の実装クラス:
ChunkMessageChannelItemWriter
、CompositeStepExecutionListener
、ExecutionContextPromotionListener
、JobParameterExecutionContextCopyListener
、MulticasterBatchListener
、NoWorkFoundStepExecutionListener
、StepExecutionListenerSupport
、StepExecutionSimpleCompletionPolicy
、StepListenerSupport
、SystemCommandTasklet
Step
のライフサイクルのリスナーインターフェース。- 作成者:
- Lucas Ward, Dave Syer, Mahmoud Ben Hassine, Parikshit Dutta
メソッドのサマリー
修飾子と型メソッド説明default ExitStatus
afterStep
(StepExecution stepExecution) リスナーにステップの終了ステータスを変更する機会を与えます。default void
beforeStep
(StepExecution stepExecution) 現在のスコープのStepExecution
を使用して、リスナーの状態を初期化します。
メソッドの詳細
beforeStep
現在のスコープのStepExecution
を使用して、リスナーの状態を初期化します。- パラメーター:
stepExecution
-StepExecution
のインスタンス。
afterStep
リスナーにステップの終了ステータスを変更する機会を与えます。返された値は、ExitStatus.and(ExitStatus)
を使用して通常の終了ステータスと結合されます。ステップの処理ロジックの実行後に (成功または失敗に関係なく) 呼び出されます。このメソッドで例外をスローしても、ログに記録されるだけなので効果はありません。
- パラメーター:
stepExecution
-StepExecution
インスタンス。- 戻り値:
- 通常の値と組み合わせる
ExitStatus
。古い値を変更しない場合は、null
(デフォルト) を返します。