INT-1890 added error-channel to HTTP Inboudn gateway/adapter

This commit is contained in:
Oleg Zhurakousky
2011-05-04 19:54:16 -04:00
parent 5b60eba10b
commit e338233bae
6 changed files with 27 additions and 6 deletions

View File

@@ -16,7 +16,7 @@
<si:queue capacity="1"/>
</si:channel>
<inbound-channel-adapter id="defaultAdapter" channel="requests"/>
<inbound-channel-adapter id="defaultAdapter" channel="requests" error-channel="errorChannel"/>
<inbound-channel-adapter id="postOnlyAdapter" channel="requests" supported-methods="POST"/>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2011 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.
@@ -95,6 +95,7 @@ public class HttpInboundChannelAdapterParserTests {
assertEquals("foo", map.keySet().iterator().next());
assertEquals(1, map.get("foo").size());
assertEquals("bar", map.getFirst("foo"));
assertNotNull(TestUtils.getPropertyValue(defaultAdapter, "errorChannel"));
}
@Test

View File

@@ -18,7 +18,7 @@
<si:queue/>
</si:channel>
<inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses" convert-exceptions="true"/>
<inbound-gateway id="inboundGateway" request-channel="requests" reply-channel="responses" convert-exceptions="true" error-channel="errorChannel"/>
<inbound-gateway id="inboundController" request-channel="requests" reply-channel="responses" view-name="foo" error-code="oops"/>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2011 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.
@@ -89,6 +89,7 @@ public class HttpInboundGatewayParserTests {
assertThat((Boolean) getPropertyValue(gateway, "expectReply"), is(true));
assertThat((Boolean) getPropertyValue(gateway, "convertExceptions"), is(true));
assertThat((PollableChannel) getPropertyValue(gateway, "replyChannel"), is(responses));
assertNotNull(TestUtils.getPropertyValue(gateway, "errorChannel"));
}
@Test(timeout=1000)