Class EventEmittingChunkListener
java.lang.Object
org.springframework.cloud.task.batch.listener.EventEmittingChunkListener
- All Implemented Interfaces:
org.springframework.batch.core.ChunkListener
,org.springframework.batch.core.StepListener
,org.springframework.core.Ordered
public class EventEmittingChunkListener
extends Object
implements org.springframework.batch.core.ChunkListener, org.springframework.core.Ordered
Provides informational messages around the
Chunk
of a batch job.
The ChunkListener.beforeChunk(ChunkContext)
and
ChunkListener.afterChunk(ChunkContext)
are both no-ops in this implementation.
ChunkListener.afterChunkError(ChunkContext)
.- Author:
- Ali Shahbour
-
Field Summary
Fields inherited from interface org.springframework.batch.core.ChunkListener
ROLLBACK_EXCEPTION_KEY
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionEventEmittingChunkListener
(MessagePublisher messagePublisher, int order, TaskEventProperties properties) EventEmittingChunkListener
(MessagePublisher messagePublisher, TaskEventProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterChunk
(org.springframework.batch.core.scope.context.ChunkContext context) void
afterChunkError
(org.springframework.batch.core.scope.context.ChunkContext context) void
beforeChunk
(org.springframework.batch.core.scope.context.ChunkContext context) int
getOrder()
-
Constructor Details
-
EventEmittingChunkListener
public EventEmittingChunkListener(MessagePublisher messagePublisher, TaskEventProperties properties) -
EventEmittingChunkListener
public EventEmittingChunkListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties)
-
-
Method Details
-
beforeChunk
public void beforeChunk(org.springframework.batch.core.scope.context.ChunkContext context) - Specified by:
beforeChunk
in interfaceorg.springframework.batch.core.ChunkListener
-
afterChunk
public void afterChunk(org.springframework.batch.core.scope.context.ChunkContext context) - Specified by:
afterChunk
in interfaceorg.springframework.batch.core.ChunkListener
-
afterChunkError
public void afterChunkError(org.springframework.batch.core.scope.context.ChunkContext context) - Specified by:
afterChunkError
in interfaceorg.springframework.batch.core.ChunkListener
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-