类 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
    A 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.
    作者:
    Dave Syer, Michael Minella
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
      • handleChunk

        @ServiceActivator
        public ChunkResponse handleChunk​(ChunkRequest<S> chunkRequest)
                                  throws java.lang.Exception
        从接口复制的说明: ChunkHandler
        Handle 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)