Class EventEmittingStepExecutionListener
java.lang.Object
org.springframework.cloud.task.batch.listener.EventEmittingStepExecutionListener
- All Implemented Interfaces:
org.springframework.batch.core.StepExecutionListener,org.springframework.batch.core.StepListener,org.springframework.core.Ordered
public class EventEmittingStepExecutionListener
extends Object
implements org.springframework.batch.core.StepExecutionListener, org.springframework.core.Ordered
Provides a
StepExecutionEvent at the start and end of each step indicating the
step's status. The StepExecutionListener.afterStep(StepExecution) returns the
ExitStatus of the inputted StepExecution.- Author:
- Michael Minella, Glenn Renfro, Ali Shahbour
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionEventEmittingStepExecutionListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties) EventEmittingStepExecutionListener(MessagePublisher messagePublisher, TaskEventProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.batch.core.ExitStatusafterStep(org.springframework.batch.core.StepExecution stepExecution) voidbeforeStep(org.springframework.batch.core.StepExecution stepExecution) intgetOrder()
-
Constructor Details
-
EventEmittingStepExecutionListener
public EventEmittingStepExecutionListener(MessagePublisher messagePublisher, TaskEventProperties properties) -
EventEmittingStepExecutionListener
public EventEmittingStepExecutionListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties)
-
-
Method Details
-
beforeStep
public void beforeStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
beforeStepin interfaceorg.springframework.batch.core.StepExecutionListener
-
afterStep
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
afterStepin interfaceorg.springframework.batch.core.StepExecutionListener
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-