Added support for 'order' and 'auto-startup' on HTTP 'outbound-gateway'.
This commit is contained in:
@@ -128,6 +128,15 @@
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="order" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Specifies the order for invocation when this gateway is connected as a
|
||||
subscriber to a SubscribableChannel.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="auto-startup" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
request-mapper="mapper"
|
||||
request-executor="executor"
|
||||
request-timeout="1234"
|
||||
reply-channel="replies"/>
|
||||
reply-channel="replies"
|
||||
order="77"
|
||||
auto-startup="false"/>
|
||||
|
||||
<outbound-gateway id="fullConfigWithoutMapper"
|
||||
request-channel="requests"
|
||||
|
||||
@@ -85,12 +85,14 @@ public class HttpOutboundGatewayParserTests {
|
||||
|
||||
@Test
|
||||
public void fullConfigWithMapper() throws Exception {
|
||||
HttpOutboundEndpoint gateway = (HttpOutboundEndpoint) new DirectFieldAccessor(
|
||||
this.fullConfigWithMapperEndpoint).getPropertyValue("handler");
|
||||
DirectFieldAccessor endpointAccessor = new DirectFieldAccessor(this.fullConfigWithMapperEndpoint);
|
||||
HttpOutboundEndpoint gateway = (HttpOutboundEndpoint) endpointAccessor.getPropertyValue("handler");
|
||||
MessageChannel requestChannel = (MessageChannel) new DirectFieldAccessor(
|
||||
this.fullConfigWithMapperEndpoint).getPropertyValue("inputChannel");
|
||||
assertEquals(this.applicationContext.getBean("requests"), requestChannel);
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
|
||||
assertEquals(77, accessor.getPropertyValue("order"));
|
||||
assertEquals(Boolean.FALSE, endpointAccessor.getPropertyValue("autoStartup"));
|
||||
Object replyChannel = accessor.getPropertyValue("outputChannel");
|
||||
assertNotNull(replyChannel);
|
||||
assertEquals(this.applicationContext.getBean("replies"), replyChannel);
|
||||
|
||||
Reference in New Issue
Block a user