From b416eca31eab2b51079f6d206e3b638d38f3d07b Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Sat, 4 Jul 2009 01:36:47 +0000 Subject: [PATCH] INT-676 --- spring-integration-reference/src/message.xml | 4 ++ .../src/resequencer.xml | 9 ++-- .../src/resources.xml | 4 +- spring-integration-reference/src/rmi.xml | 2 +- spring-integration-reference/src/router.xml | 42 ++++++++++--------- 5 files changed, 35 insertions(+), 26 deletions(-) diff --git a/spring-integration-reference/src/message.xml b/spring-integration-reference/src/message.xml index 27619acb4b..ad06c9dc3d 100644 --- a/spring-integration-reference/src/message.xml +++ b/spring-integration-reference/src/message.xml @@ -92,6 +92,10 @@ REPLY_CHANNEL java.lang.Object (can be a String or MessageChannel) + + ERROR_CHANNEL + java.lang.Object (can be a String or MessageChannel) + SEQUENCE_NUMBER java.lang.Integer diff --git a/spring-integration-reference/src/resequencer.xml b/spring-integration-reference/src/resequencer.xml index a2e19a9d7e..ed21f41a10 100644 --- a/spring-integration-reference/src/resequencer.xml +++ b/spring-integration-reference/src/resequencer.xml @@ -16,8 +16,9 @@ The Resequencer works in a similar way to the Aggregator, in the sense that it uses the CORRELATION_ID to store messages in groups, the - difference being that all what the Resequencer does, is to release them in - the order of their SEQUENCE_NUMBER. + difference being that the Resequencer does not process the messages in + any way. It simply releases them in the order of their SEQUENCE_NUMBER + header values. With respect to that, the user might opt to release all messages at once (after the whole sequence, according to the SEQUENCE_SIZE, has been @@ -79,7 +80,7 @@ - The timeout for reordering message sequences (counted from the + The timeout (in milliseconds) for reordering message sequences (counted from the arrival of the first message). Optional. @@ -110,7 +111,7 @@ - Since there is no custom behaviour to be implemented in Java classes for resequencers, there is no annotation support for it. + Since there is no custom behavior to be implemented in Java classes for resequencers, there is no annotation support for it. diff --git a/spring-integration-reference/src/resources.xml b/spring-integration-reference/src/resources.xml index 81d1020356..bd9d8d2281 100644 --- a/spring-integration-reference/src/resources.xml +++ b/spring-integration-reference/src/resources.xml @@ -7,8 +7,8 @@ Spring Integration Home The definitive source of information about Spring Integration is the - Spring Integration Home at - http://www.springframework.org. That site serves as a hub of + Spring Integration Home at + http://www.springsource.org. That site serves as a hub of information and is the best place to find up-to-date announcements about the project as well as links to articles, blogs, and new sample applications. diff --git a/spring-integration-reference/src/rmi.xml b/spring-integration-reference/src/rmi.xml index 1a5b332209..bc823da3b7 100644 --- a/spring-integration-reference/src/rmi.xml +++ b/spring-integration-reference/src/rmi.xml @@ -6,7 +6,7 @@
Introduction - This Chapter explains how to use RMI specific channel adapters to distribute a system over multiple JVMs. The first section will deal with sending messages over RMI. The second section shows how to receive messages over RMI. The last section shows how to define rmi channel adapters through the namespace support + This Chapter explains how to use RMI specific channel adapters to distribute a system over multiple JVMs. The first section will deal with sending messages over RMI. The second section shows how to receive messages over RMI. The last section shows how to define rmi channel adapters through the namespace support.
diff --git a/spring-integration-reference/src/router.xml b/spring-integration-reference/src/router.xml index 0a0f6331d1..c7965c977b 100644 --- a/spring-integration-reference/src/router.xml +++ b/spring-integration-reference/src/router.xml @@ -27,10 +27,10 @@ ]]> - Configuration of PayloadTypeRouter is also supported via namespace support provided by Spring Integration (see ), + Configuration of PayloadTypeRouter is also supported via the namespace provided by Spring Integration (see ), which essentially simplifies configuration by combining <router/> configuration and its corresponding implementation defined using <bean/> element into a single and more concise configuration element. - Example below demonstrates PayloadTypeRouter configuration which is equivalent to the one above using Spring Integration namespace support: + The example below demonstrates PayloadTypeRouter configuration which is equivalent to the one above using Spring Integration's namespace support: @@ -52,8 +52,8 @@ 2. Channel name - If arbitrary value, then channelResolver should be provided to map header values to channel names. - Example below uses MapBasedChannelResolver to set up a map of header values to channel names. + If arbitrary value, then a channelResolver should be provided to map header values to channel names. + The example below uses MapBasedChannelResolver to set up a map of header values to channel names. @@ -69,7 +69,7 @@ ]]> - If channelResolver is not specified, then header value will be treated as channel name + If channelResolver is not specified, then the header value will be treated as a channel name making configuration much simpler, where no channelResolver needs to be specified. Similar to the PayloadTypeRouter, configuration of HeaderValueRouter is also supported via namespace support provided by Spring Integration (see ). - Example below demonstrates two types of namespace-based configuration of HeaderValueRouter which are equivalent to the ones above using Spring Integration namespace support: + The example below demonstrates two types of namespace-based configuration of HeaderValueRouter which are equivalent to the ones above using Spring Integration namespace support: 1. Configuration where mapping of header values to channels is required @@ -93,6 +93,12 @@ ]]> + + The two router implementations shown above share some common properties, such as "defaultOutputChannel" and "resolutionRequired". + If "resolutionRequired" is set to "true", and the router is unable to determine a target channel (e.g. there is + no matching payload for a PayloadTypeRouter and no "defaultOutputChannel" has been specified), then an Exception + will be thrown. +
RecipientListRouter @@ -110,15 +116,9 @@ ]]>
- - The router implementations share some common properties, such as "defaultOutputChannel" and "resolutionRequired". - If "resolutionRequired" is set to "true", and the router is unable to determine a target channel (e.g. there is - no matching payload for a PayloadTypeRouter and no "defaultOutputChannel" has been specified), then an Exception - will be thrown. - Configuration for RecipientListRouter is also supported via namespace support provided by Spring Integration (see ). - Example below demonstrates namespace-based configuration of RecipientListRouter and all the supported attributes using Spring Integration namespace support: + The example below demonstrates namespace-based configuration of RecipientListRouter and all the supported attributes using Spring Integration namespace support: ]]> + + The 'apply-sequence' flag here has the same affect as it does for a publish-subscribe-channel, + and like publish-subscribe-channel it is disabled by default on the recipient-list-router. Refer to + for more information. +
The <router> element The "router" element provides a simple way to connect a router to an input channel, and also accepts the - optional default output channel. The "ref" may provide the bean name to one of the implementations described - above or a custom Router implementation (extending AbstractMessageRouter): + optional default output channel. The "ref" may provide the bean name of a custom Router implementation + (extending AbstractMessageRouter): @@ -151,8 +156,7 @@ ]]> Using a "ref" attribute is generally recommended if the custom router implementation can be reused in other <router> definitions. However if the custom router implementation should be scoped to a - concrete definition of the <router>, starting with v1.0.3, Spring Integration supports inner - bean definitions for custom routers within the <router> element: + concrete definition of the <router>, you can provide an inner bean definition: ]]> @@ -160,7 +164,7 @@ Using both the "ref" attribute and an inner handler definition in the same <router> configuration - is not allowed, as it creates an ambiguous condition and will result in Exception being thrown. + is not allowed, as it creates an ambiguous condition and will result in an Exception being thrown.
@@ -189,7 +193,7 @@ public List<String> route(Foo payload) {...}
In addition to payload-based routing, a common requirement is to route based on metadata available within the message header as either a property or attribute. Rather than requiring use of the Message type as the method parameter, the @Router - annotation may also use the @Header parameter annotation that is documented in section . + annotation may also use the @Header parameter annotation that is documented in . @Router public List<String> route(@Header("orderStatus") OrderStatus status)