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_KEYFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionEventEmittingChunkListener(MessagePublisher messagePublisher, int order, TaskEventProperties properties) EventEmittingChunkListener(MessagePublisher messagePublisher, TaskEventProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterChunk(org.springframework.batch.core.scope.context.ChunkContext context) voidafterChunkError(org.springframework.batch.core.scope.context.ChunkContext context) voidbeforeChunk(org.springframework.batch.core.scope.context.ChunkContext context) intgetOrder()
-
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:
beforeChunkin interfaceorg.springframework.batch.core.ChunkListener
-
afterChunk
public void afterChunk(org.springframework.batch.core.scope.context.ChunkContext context) - Specified by:
afterChunkin interfaceorg.springframework.batch.core.ChunkListener
-
afterChunkError
public void afterChunkError(org.springframework.batch.core.scope.context.ChunkContext context) - Specified by:
afterChunkErrorin interfaceorg.springframework.batch.core.ChunkListener
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-