类 ChunkProcessorChunkHandler<S>
- java.lang.Object
- org.springframework.batch.integration.chunk.ChunkProcessorChunkHandler<S>
- 类型参数:
S- the type of the items in the chunk to be handled
- 所有已实现的接口:
ChunkHandler<S>,org.springframework.beans.factory.InitializingBean
@MessageEndpoint public class ChunkProcessorChunkHandler<S> extends java.lang.Object implements ChunkHandler<S>, org.springframework.beans.factory.InitializingBean
AChunkHandlerbased on aChunkProcessor. 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.- 作者:
- Dave Syer, Michael Minella
构造器概要
构造器 构造器 说明 ChunkProcessorChunkHandler()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()ChunkResponsehandleChunk(ChunkRequest<S> chunkRequest)Handle the chunk, processing all the items and returning a response summarising the result.voidsetChunkProcessor(ChunkProcessor<S> chunkProcessor)Public setter for theChunkProcessor.
构造器详细资料
ChunkProcessorChunkHandler
public ChunkProcessorChunkHandler()
方法详细资料
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
java.lang.Exception
setChunkProcessor
public void setChunkProcessor(ChunkProcessor<S> chunkProcessor)
Public setter for theChunkProcessor.- 参数:
chunkProcessor- the chunkProcessor to set
handleChunk
@ServiceActivator public ChunkResponse handleChunk(ChunkRequest<S> chunkRequest) throws java.lang.Exception
从接口复制的说明:ChunkHandlerHandle the chunk, processing all the items and returning a response summarising the result. If the result is a failure then the response should say so. The handler only throws an exception if it needs to roll back a transaction and knows that the request will be re-delivered (if not to the same handler then to one processing the same Step).- 指定者:
handleChunk在接口中ChunkHandler<S>- 参数:
chunkRequest- a request containing the chunk to process- 返回:
- a response summarising the result
- 抛出:
java.lang.Exception- if the handler needs to roll back a transaction and have the chunk re-delivered- 另请参阅:
ChunkHandler.handleChunk(ChunkRequest)