Merge pull request #374 from ghillert/INT-2461
This commit is contained in:
@@ -90,14 +90,14 @@
|
||||
<xsd:documentation>
|
||||
Allows you to specify the URI path (e.g., /orderId/{order})
|
||||
|
||||
When using the 'path' attribute, please ensure to also
|
||||
declare a handler mapping bean of type
|
||||
'org.springframework.integration.http.inbound.UriPathHandlerMapping'.
|
||||
When using the 'path' attribute, please ensure to also
|
||||
declare a handler mapping bean of type
|
||||
'org.springframework.integration.http.inbound.UriPathHandlerMapping'.
|
||||
|
||||
This bean is used by the Spring MVC DispatcherServlet to
|
||||
evaluate which URL maps to which inbound endpoint. For
|
||||
more information please see the chapter on 'Handler mappings'
|
||||
in the Spring Framework Reference Documentation.
|
||||
This bean is used by the Spring MVC DispatcherServlet to
|
||||
evaluate which URL maps to which inbound endpoint. For
|
||||
more information please see the chapter on 'Handler mappings'
|
||||
in the Spring Framework Reference Documentation.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
@@ -212,9 +212,9 @@ The String "HTTP_REQUEST_HEADERS" will match against any of the standard HTTP Re
|
||||
<xsd:documentation>
|
||||
Allows you to specify the URI path (e.g., /orderId/{order})
|
||||
|
||||
When using the 'path' attribute, please ensure to also
|
||||
declare a handler mapping bean of type
|
||||
'org.springframework.integration.http.inbound.UriPathHandlerMapping'.
|
||||
When using the 'path' attribute, please ensure to also
|
||||
declare a handler mapping bean of type
|
||||
'org.springframework.integration.http.inbound.UriPathHandlerMapping'.
|
||||
|
||||
This bean is used by the Spring MVC DispatcherServlet
|
||||
to evaluate which URL maps to which inbound endpoint.
|
||||
@@ -297,7 +297,26 @@ The String "HTTP_REQUEST_HEADERS" will match against any of the standard HTTP Re
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="reply-key" type="xsd:string" />
|
||||
<xsd:attribute name="request-timeout" type="xsd:string" />
|
||||
<xsd:attribute name="request-timeout" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Used to set the sendTimeout on the underlying MessagingTemplate instance
|
||||
(org.springframework.integration.core.MessagingTemplate) for sending messages
|
||||
to the request channel. If not specified this propery will default to "1000"
|
||||
(1 second).
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="reply-timeout" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Used to set the revceiveTimeout on the underlying MessagingTemplate instance
|
||||
(org.springframework.integration.core.MessagingTemplate) for receiving messages
|
||||
from the reply channel. If not specified this propery will default to "1000"
|
||||
(1 second).
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
@@ -562,6 +581,21 @@ The String "HTTP_REQUEST_HEADERS" will match against any of the standard HTTP Re
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="reply-timeout" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The "reply-timeout" attribute maps to the "sendTimeout" property of the
|
||||
unerlying "MessagingTemplate" instance (org.springframework.integration.core.MessagingTemplate).
|
||||
The attribute will default, if not specified, to "-1"; it is used when
|
||||
sending the reply message (HTTP Response) to the reply channel.
|
||||
|
||||
This means, that depending on the implementation, the Message Channel's "send"
|
||||
method may block indefinitely, by default. Note, though, that the "reply-timeout" attribute is
|
||||
only used, when the actual MessageChannel implementation has a blocking send,
|
||||
such as when a bounded QueueChannel is "full".
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
@@ -651,7 +685,6 @@ The String "HTTP_REQUEST_HEADERS" will match against any of the standard HTTP Re
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="reply-timeout" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
||||
@@ -18,7 +18,13 @@
|
||||
<si:queue/>
|
||||
</si:channel>
|
||||
|
||||
<inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses" convert-exceptions="true" error-channel="errorChannel"/>
|
||||
<inbound-gateway id="inboundGateway"
|
||||
request-channel="requests"
|
||||
reply-channel="responses"
|
||||
convert-exceptions="true"
|
||||
request-timeout="1234"
|
||||
reply-timeout="4567"
|
||||
error-channel="errorChannel"/>
|
||||
|
||||
<inbound-gateway id="inboundController" request-channel="requests" reply-channel="responses" view-name="foo" error-code="oops"/>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,6 +41,7 @@ import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.integration.Message;
|
||||
import org.springframework.integration.MessageHeaders;
|
||||
import org.springframework.integration.core.MessagingTemplate;
|
||||
import org.springframework.integration.core.PollableChannel;
|
||||
import org.springframework.integration.core.SubscribableChannel;
|
||||
import org.springframework.integration.http.MockHttpServletRequest;
|
||||
@@ -56,6 +57,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
* @author Mark Fisher
|
||||
* @author Iwein Fuld
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
@@ -90,6 +92,10 @@ public class HttpInboundGatewayParserTests {
|
||||
assertThat((Boolean) getPropertyValue(gateway, "convertExceptions"), is(true));
|
||||
assertThat((PollableChannel) getPropertyValue(gateway, "replyChannel"), is(responses));
|
||||
assertNotNull(TestUtils.getPropertyValue(gateway, "errorChannel"));
|
||||
MessagingTemplate messagingTemplate = TestUtils.getPropertyValue(
|
||||
gateway, "messagingTemplate", MessagingTemplate.class);
|
||||
assertEquals(Long.valueOf(1234), TestUtils.getPropertyValue(messagingTemplate, "sendTimeout"));
|
||||
assertEquals(Long.valueOf(4567), TestUtils.getPropertyValue(messagingTemplate, "receiveTimeout"));
|
||||
}
|
||||
|
||||
@Test(timeout=1000)
|
||||
|
||||
Reference in New Issue
Block a user