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

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

Introduction

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

Prototype

public String getRequestTimeout() 

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