Example usage for org.springframework.integration.gateway GatewayMethodMetadata getReplyChannelName

List of usage examples for org.springframework.integration.gateway GatewayMethodMetadata getReplyChannelName

Introduction

In this page you can find the example usage for org.springframework.integration.gateway GatewayMethodMetadata getReplyChannelName.

Prototype

public String getReplyChannelName() 

Source Link

Usage

From source file:org.springframework.integration.config.xml.GatewayParserTests.java

@Test
public void testOneWayOverride() {
    TestService service = (TestService) context.getBean("methodOverride");
    service.oneWay("foo");
    PollableChannel channel = (PollableChannel) context.getBean("otherRequestChannel");
    Message<?> result = channel.receive(1000);
    assertEquals("fiz", result.getPayload());
    assertEquals("bar", result.getHeaders().get("foo"));
    assertEquals("qux", result.getHeaders().get("baz"));
    GatewayProxyFactoryBean fb = context.getBean("&methodOverride", GatewayProxyFactoryBean.class);
    Map<?, ?> methods = TestUtils.getPropertyValue(fb, "methodMetadataMap", Map.class);
    GatewayMethodMetadata meta = (GatewayMethodMetadata) methods.get("oneWay");
    assertNotNull(meta);/*from w ww .  j  a  v  a  2s .  c  o  m*/
    assertEquals("456", meta.getRequestTimeout());
    assertEquals("123", meta.getReplyTimeout());
    assertEquals("foo", meta.getReplyChannelName());
}