Example usage for org.springframework.integration.gateway GatewayProxyFactoryBean setDefaultReplyChannel

List of usage examples for org.springframework.integration.gateway GatewayProxyFactoryBean setDefaultReplyChannel

Introduction

In this page you can find the example usage for org.springframework.integration.gateway GatewayProxyFactoryBean setDefaultReplyChannel.

Prototype

public void setDefaultReplyChannel(MessageChannel defaultReplyChannel) 

Source Link

Document

Set the default reply channel.

Usage

From source file:org.acme.echo.module.ModuleGatewayRequestExchanger.java

@Override
public void afterPropertiesSet() throws Exception {
    GatewayProxyFactoryBean gatewayFactory = new GatewayProxyFactoryBean();
    String requestChannel = "echoStartChannel"; // we might want to get from some module.properties file
    String replyChannel = "echoEndChannel";
    gatewayFactory.setDefaultRequestChannel(moduleContext.getBean(requestChannel, MessageChannel.class));
    gatewayFactory.setDefaultReplyChannel(moduleContext.getBean(replyChannel, MessageChannel.class));
    gatewayFactory.afterPropertiesSet();
    requestReplyExchanger = (RequestReplyExchanger) gatewayFactory.getObject();
}