S
- the type of the items in the chunk to be handled@MessageEndpoint public class ChunkProcessorChunkHandler<S> extends Object implements ChunkHandler<S>, org.springframework.beans.factory.InitializingBean
ChunkHandler
based on a ChunkProcessor
. Knows how to distinguish between a processor that is fault
tolerant, and one that is not. If the processor is fault tolerant then exceptions can be propagated on the assumption
that there will be a roll back and the request will be re-delivered.Constructor and Description |
---|
ChunkProcessorChunkHandler() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
ChunkResponse |
handleChunk(ChunkRequest<S> chunkRequest)
Handle the chunk, processing all the items and returning a response summarising the result.
|
void |
setChunkProcessor(org.springframework.batch.core.step.item.ChunkProcessor<S> chunkProcessor)
Public setter for the
ChunkProcessor . |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void setChunkProcessor(org.springframework.batch.core.step.item.ChunkProcessor<S> chunkProcessor)
ChunkProcessor
.chunkProcessor
- the chunkProcessor to set@ServiceActivator public ChunkResponse handleChunk(ChunkRequest<S> chunkRequest) throws Exception
ChunkHandler
handleChunk
in interface ChunkHandler<S>
chunkRequest
- a request containing the chunk to processException
- if the handler needs to roll back a transaction and have the chunk re-deliveredChunkHandler.handleChunk(ChunkRequest)
Copyright © 2015. All rights reserved.