Example usage for org.springframework.batch.integration.partition MessageChannelPartitionHandler setReplyChannel

List of usage examples for org.springframework.batch.integration.partition MessageChannelPartitionHandler setReplyChannel

Introduction

In this page you can find the example usage for org.springframework.batch.integration.partition MessageChannelPartitionHandler setReplyChannel.

Prototype

public void setReplyChannel(PollableChannel replyChannel) 

Source Link

Usage

From source file:com.apress.prospringintegration.springbatch.partition.PartitionConfiguration.java

@Bean
public MessageChannelPartitionHandler partitionHandler() {
    MessageChannelPartitionHandler partitionHandler = new MessageChannelPartitionHandler();
    partitionHandler.setMessagingOperations(messagingTemplate());
    partitionHandler.setReplyChannel(pollableChannel);
    partitionHandler.setStepName("step1");
    partitionHandler.setGridSize(10);/* ww w  . j  a va  2 s . c om*/
    return partitionHandler;
}

From source file:uk.ac.kcl.batch.RemoteConfiguration.java

@Bean
@Qualifier("partitionHandler")
public MessageChannelPartitionHandler partitionHandler(@Qualifier("requestChannel") MessageChannel reqChannel,
        @Qualifier("aggregatedReplyChannel") PollableChannel repChannel) {
    MessageChannelPartitionHandler handler = new MessageChannelPartitionHandler();
    handler.setGridSize(gridSize);//from w  ww .j a v  a  2  s  .  c o m
    handler.setStepName("compositeSlaveStep");
    handler.setReplyChannel(repChannel);
    MessagingTemplate template = new MessagingTemplate();
    template.setDefaultChannel(reqChannel);
    template.setReceiveTimeout(partitionHandlerTimeout);
    handler.setMessagingOperations(template);
    return handler;
}