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

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

Introduction

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

Prototype

public String getReplyTimeout() 

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);/*  w  w  w  .ja  va 2  s .  com*/
    assertEquals("456", meta.getRequestTimeout());
    assertEquals("123", meta.getReplyTimeout());
    assertEquals("foo", meta.getReplyChannelName());
}