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
ConstructorDescriptionEventEmittingStepExecutionListener
(MessagePublisher messagePublisher, int order, TaskEventProperties properties) EventEmittingStepExecutionListener
(MessagePublisher messagePublisher, TaskEventProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.batch.core.ExitStatus
afterStep
(org.springframework.batch.core.StepExecution stepExecution) void
beforeStep
(org.springframework.batch.core.StepExecution stepExecution) int
getOrder()
-
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:
beforeStep
in interfaceorg.springframework.batch.core.StepExecutionListener
-
afterStep
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
afterStep
in interfaceorg.springframework.batch.core.StepExecutionListener
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-