Class CompositeChunkListener
java.lang.Object
org.springframework.batch.core.listener.CompositeChunkListener
- All Implemented Interfaces:
ChunkListener,StepListener
- Author:
- Lucas Ward
-
Field Summary
Fields inherited from interface org.springframework.batch.core.ChunkListener
ROLLBACK_EXCEPTION_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterChunk(ChunkContext context) Call the registered listeners in reverse order.voidafterChunkError(ChunkContext context) Call the registered listeners in reverse order.voidbeforeChunk(ChunkContext context) Call the registered listeners in order, respecting and prioritizing those that implementOrdered.voidregister(ChunkListener chunkListener) Register additional listener.voidsetListeners(List<? extends ChunkListener> listeners) Public setter for the listeners.
-
Constructor Details
-
CompositeChunkListener
public CompositeChunkListener()
-
-
Method Details
-
setListeners
Public setter for the listeners.- Parameters:
listeners- list ofChunkListener.
-
register
Register additional listener.- Parameters:
chunkListener- instance ofChunkListener.
-
afterChunk
Call the registered listeners in reverse order.- Specified by:
afterChunkin interfaceChunkListener- Parameters:
context- The currentChunkContext- See Also:
-
beforeChunk
Call the registered listeners in order, respecting and prioritizing those that implementOrdered.- Specified by:
beforeChunkin interfaceChunkListener- Parameters:
context- The currentChunkContext- See Also:
-
afterChunkError
Call the registered listeners in reverse order.- Specified by:
afterChunkErrorin interfaceChunkListener- Parameters:
context- the chunk context containing the exception that caused the underlying rollback.- See Also:
-