Class EventEmittingItemReadListener
java.lang.Object
org.springframework.cloud.task.batch.listener.EventEmittingItemReadListener
- All Implemented Interfaces:
org.springframework.batch.core.ItemReadListener,org.springframework.batch.core.StepListener,org.springframework.core.Ordered
public class EventEmittingItemReadListener
extends Object
implements org.springframework.batch.core.ItemReadListener, org.springframework.core.Ordered
Provides informational messages around the
ItemReader of a batch job.
The ItemReadListener.beforeRead() and
ItemReadListener.afterRead(Object) are both no-ops in this implementation.
ItemReadListener.onReadError(Exception) provides the exception via the
BatchJobHeaders.BATCH_EXCEPTION message header.- Author:
- Glenn Renfro, Ali Shahbour
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionEventEmittingItemReadListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties) EventEmittingItemReadListener(MessagePublisher messagePublisher, TaskEventProperties properties) -
Method Summary
-
Constructor Details
-
EventEmittingItemReadListener
public EventEmittingItemReadListener(MessagePublisher messagePublisher, TaskEventProperties properties) -
EventEmittingItemReadListener
public EventEmittingItemReadListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties)
-
-
Method Details
-
beforeRead
public void beforeRead()- Specified by:
beforeReadin interfaceorg.springframework.batch.core.ItemReadListener
-
afterRead
- Specified by:
afterReadin interfaceorg.springframework.batch.core.ItemReadListener
-
onReadError
- Specified by:
onReadErrorin interfaceorg.springframework.batch.core.ItemReadListener
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-