INT-500, schema documentation as well as modified tests to match the schema documentation

This commit is contained in:
Oleg Zhurakousky
2010-05-03 22:14:58 +00:00
parent bd0cd1ff03
commit 32f030e9f8
3 changed files with 66 additions and 20 deletions

View File

@@ -34,6 +34,13 @@
</xsd:annotation>
<xsd:attribute name="task-executor" type="xsd:string">
<xsd:annotation>
<xsd:documentation><![CDATA[
Provides reference to bean that implements org.springframework.core.task.TaskExecutor to use when dispatching Messages
to this channel's subscribers. Also, when using a TaskExecutor.
Keep in mind that any transaction active for the sender will NOT propagate to the handler invocation since the
TaskExecutor dispatches to the handler on a separate Thread.
Usually configured using 'task' namespace support provided by Spring (e.g., &lt;task:executor/&gt;)
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="org.springframework.core.task.TaskExecutor" />
@@ -128,7 +135,7 @@
<xsd:annotation>
<xsd:documentation>
Capacity for this queue. Default capacity is 0 which means
this queue will accumulate as many messages as memory allows.
this queue will accumulate as many messages as memory allows.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@@ -446,13 +453,25 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="request-timeout" type="xsd:string"/>
<xsd:attribute name="request-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Provides the amount of time dispatcher would wait to send a message.
This timeout would only apply if there is a potential to block in the send call.
For example if this gateway is hooked up to a Queue channel. 
Value is specified in milliseconds.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="reply-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Allows you to specify how long this gateway will wait for the reply message
before throwing an exception. By default it will wait indefinitely. Value is specified in milliseconds
before throwing an exception. By default it will wait indefinitely.
Value is specified in milliseconds
]]>
</xsd:documentation>
</xsd:annotation>
@@ -506,14 +525,26 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default-request-timeout" type="xsd:string" />
<xsd:attribute name="default-request-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Provides the amount of time dispatcher would wait to send a message.
This timeout would only apply if there is a potential to block in the send call.
For example if this gateway is hooked up to a Queue channel. 
Value is specified in milliseconds.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="default-reply-timeout" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Allows you to specify how long this gateway will wait for the reply message
before throwing an exception. By default it will wait indefinitely. Value is specified in milliseconds.
]]>
<![CDATA[
Allows you to specify how long this gateway will wait for the reply message
before throwing an exception. By default it will wait indefinitely.
Value is specified in milliseconds.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
@@ -528,6 +559,11 @@
</xsd:annotation>
<xsd:attribute name="request-channel" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
Identifies channel the message will be sent to upon invocation of methods of this gateway
]]>
</xsd:documentation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type
@@ -536,18 +572,18 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="reply-channel" type="xsd:string">
<xsd:attribute name="request-timeout" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type
type="org.springframework.integration.core.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
<xsd:documentation>
<![CDATA[
Provides the amount of time dispatcher would wait to send a message.
This timeout would only apply if there is a potential to block in the send call.
For example if this gateway is hooked up to a Queue channel. 
Value is specified in milliseconds.
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="request-timeout" type="xsd:string" />
<xsd:attribute name="reply-timeout" type="xsd:string" />
</xsd:complexType>
<xsd:element name="inbound-channel-adapter" type="methodInvokingChannelAdapterType">

View File

@@ -27,6 +27,16 @@
<si:chain input-channel="inputC">
<si:header-enricher>
<si:header name="name" value="oleg" />
</si:header-enricher>
<si:gateway request-channel="inputD"/>
<si:service-activator>
<bean class="org.springframework.integration.gateway.GatewayInvokingMessageHandlerTests$SimpleService" />
</si:service-activator>
</si:chain>
<si:chain id="FOO" input-channel="inputD">
<si:header-enricher>
<si:header name="name" value="oleg" />
</si:header-enricher>

View File

@@ -54,7 +54,7 @@ public class GatewayInvokingMessageHandlerTests {
public void validateGatewayInTheChainViaChannel() {
output.subscribe(new MessageHandler() {
public void handleMessage(Message<?> message) {
Assert.assertEquals("echo:echo:hello", message.getPayload());
Assert.assertEquals("echo:echo:echo:hello", message.getPayload());
Assert.assertEquals("foo", message.getHeaders().get("foo"));
Assert.assertEquals("oleg", message.getHeaders().get("name"));
}
@@ -66,13 +66,13 @@ public class GatewayInvokingMessageHandlerTests {
public void validateGatewayInTheChainViaAnotherGateway() {
output.subscribe(new MessageHandler() {
public void handleMessage(Message<?> message) {
Assert.assertEquals("echo:echo:hello", message.getPayload());
Assert.assertEquals("echo:echo:echo:hello", message.getPayload());
Assert.assertEquals("foo", message.getHeaders().get("foo"));
Assert.assertEquals("oleg", message.getHeaders().get("name"));
}
});
String result = gateway.sendRecieve("hello");
Assert.assertEquals("echo:echo:hello", result);
Assert.assertEquals("echo:echo:echo:hello", result);
}
public static interface SimpleGateway {