From 763d70d4ff879098254424f1ebd9f6290ddd17ea Mon Sep 17 00:00:00 2001 From: David Turanski Date: Fri, 29 Apr 2011 14:08:27 -0400 Subject: [PATCH] INT-1234. Added order support and documentation --- docs/src/reference/docbook/channel.xml | 28 ++++++++++++++----- .../config/xml/spring-integration-2.0.xsd | 12 ++++++++ .../GlobalWireTapTests-context.xml | 2 +- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/docs/src/reference/docbook/channel.xml b/docs/src/reference/docbook/channel.xml index ea663ef5c6..e91179d207 100644 --- a/docs/src/reference/docbook/channel.xml +++ b/docs/src/reference/docbook/channel.xml @@ -585,6 +585,9 @@ public Message receive(final PollableChannel channel) { ... }]]> Global Channel Interceptor Configuration + +Global Channel Interceptor + Channel Interceptors provide a clean and concise way of applying cross-cutting behavior per individual channel. If the same behavior should be applied on multiple channels, configuring the same set of interceptors for @@ -713,18 +716,29 @@ public Message receive(final PollableChannel channel) { ... }]]> +
+ Global Wire Tap Configuration + It is possible to configure a global wire tap as a special case of the . Simply configure a top level wire-tap element. Now, in addition to the normal wire-tap namespace support, the pattern and order attributes are supported and work in exactly the same way as with the channel-interceptor + ]]> + + A global wire tap provides a convenient way to configure a single channel wire tap externally without modifying the existing channel configuration. Simply set the pattern attribute to the target channel name. For example, This technique may be used to configure a test case to verify messages on a channel. + +
- + + + + +
+ Special Channels - If namespace support is enabled, there are also two special channels defined within the context by default: + If namespace support is enabled, there are two special channels defined within the application context by default: errorChannel and nullChannel. The 'nullChannel' acts like /dev/null, simply logging any Message sent to it at DEBUG level and returning immediately. Any time you face channel - resolution errors for a reply that you don't care about, you can set the affected component's 'output-channel' - to reference 'nullChannel' (the name 'nullChannel' is reserved within the context). The 'errorChannel' is - used internally for sending error messages, and it can be overridden with a custom configuration. It is + resolution errors for a reply that you don't care about, you can set the affected component's output-channel attribute + to 'nullChannel' (the name 'nullChannel' is reserved within the application context). The 'errorChannel' is + used internally for sending error messages and may be overridden with a custom configuration. This is discussed in greater detail in . -
- diff --git a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd index ac9e23709d..554ae90243 100644 --- a/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd +++ b/spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-2.0.xsd @@ -2800,6 +2800,18 @@ Name of the header whose value will be used to route messages + + + + [OPTIONAL] Specifies the order in which this interceptor will be + added to the existing channel + interceptors (if any). + Negative value (e.g., -2) will signify BEFORE existing iinterceptors (if any). Positive + value (e.g., 2) + will signify AFTER existing interceptors (if any) + + + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/channel/interceptor/GlobalWireTapTests-context.xml b/spring-integration-core/src/test/java/org/springframework/integration/channel/interceptor/GlobalWireTapTests-context.xml index 8ee64f0b80..e91035574b 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/channel/interceptor/GlobalWireTapTests-context.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/channel/interceptor/GlobalWireTapTests-context.xml @@ -26,7 +26,7 @@ - +