diff --git a/spring-integration-reference/src/aggregator.xml b/spring-integration-reference/src/aggregator.xml index b435da251f..907da1f2c2 100644 --- a/spring-integration-reference/src/aggregator.xml +++ b/spring-integration-reference/src/aggregator.xml @@ -359,7 +359,20 @@ Optional. - + + Using a "ref" attribute is generally recommended if custom aggregator handler implementation can be reused in other <aggregator> definitions. However +if custom aggregator handler implementation has to be scoped to a concrete definition of the <aggregator>, starting with v1.0.3, Spring Integration supports +inner bean definitions for custom aggregator handlers within the <aggregator> element: + + +]]> + + + + Using both "ref" attribute and inner handler definition in the same <aggregator> configuration + is not allowed, as it creates an ambiguous condition and will result in Exception being thrown + + An implementation of the aggregator bean, for example, looks as follows: diff --git a/spring-integration-reference/src/router.xml b/spring-integration-reference/src/router.xml index 14de9dfdbd..afac6e2ce1 100644 --- a/spring-integration-reference/src/router.xml +++ b/spring-integration-reference/src/router.xml @@ -123,15 +123,29 @@ 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: + above or custom Router (MessageHandler) implementations: -]]> + + + + +]]> + Alternatively, the "ref" may point to a simple Object that contains the @Router annotation (see below), or the "ref" may be combined with an explicit "method" name. When specifying a "method", the same behavior applies as described in the @Router annotation section below. ]]> + Using a "ref" attribute is generally recommended if custom router handler implementation can be reused in other <router> definitions. However +if custom router handler implementation has to be scoped to a concrete definition of the <router>, starting with v1.0.3, Spring Integration supports +inner bean definitions for custom router handlers within the <router> element: + + +]]> + + Using both "ref" attribute and inner handler definition in the same <router> configuration is not allowed, as it creates an ambiguous condition and will result in Exception being thrown +
diff --git a/spring-integration-reference/src/service-activator.xml b/spring-integration-reference/src/service-activator.xml index 11f7e5f09a..40fdb04c2a 100644 --- a/spring-integration-reference/src/service-activator.xml +++ b/spring-integration-reference/src/service-activator.xml @@ -40,6 +40,29 @@ String, then the endpoint will attempt to resolve the channel name to a channel instance. If the channel cannot be resolved, then a ChannelResolutionException will be thrown. + + The argument in the service method could be either a Message or an arbitrary type. If the later one, then it will be assumed that it is a Payload source, + which will be extracted from the message and injected into such service method. This is generally the recommended approach as it follows and promotes + a POJO model when working with Spring Integration. + Since v1.0.3 of Spring Integration, the service method does not require to have an argument at all, which means you can now implement event-style Service Activators, + where all you care about is an invocation of the service method not worrying about the contents of the message. Think of it as a NULL JMS message. An example use-case for such implementation + could be a simple counter/monitor of messages deposited on the input channel. + + + Using a "ref" attribute is generally recommended if custom Service Activator handler implementation can be reused in other <service-activator> definitions. However +if custom Service Activator handler implementation has to be scoped to a concrete definition of the <service-activator>, starting with v1.0.3, Spring Integration supports +inner bean definitions for custom Service Activator handlers within the <service-activator> element: + + \ +]]> + + + + Using both "ref" attribute and inner handler definition in the same <service-activator> configuration + is not allowed, as it creates an ambiguous condition and will result in Exception being thrown + +
\ No newline at end of file diff --git a/spring-integration-reference/src/splitter.xml b/spring-integration-reference/src/splitter.xml index 22c7927731..411cd5940e 100644 --- a/spring-integration-reference/src/splitter.xml +++ b/spring-integration-reference/src/splitter.xml @@ -97,7 +97,11 @@ A reference to a bean defined in the application context. The bean must implement the splitting logic as described in the section - above. Required. + above. Optional. + If reference to a bean is not provided, then it is assumed that the payload of the Message that arrived on the input-channel is + an implementation of java.util.Collection and the default splitting logic will be applied on such Collection, + incorporating each individual element into a Message and depositing it on the output-channel. + @@ -117,6 +121,21 @@ messages can specify a reply channel themselves). + + Using a "ref" attribute is generally recommended if custom splitter handler implementation can be reused in other <splitter> definitions. However +if custom splitter handler implementation has to be scoped to a concrete definition of the <splitter>, starting with v1.0.3, Spring Integration supports +inner bean definitions for custom splitter handlers within the <splitter> element: + + +]]> + + + + Using both "ref" attribute and inner handler definition in the same <splitter> configuration + is not allowed, as it creates an ambiguous condition and will result in Exception being thrown. + +
diff --git a/spring-integration-reference/src/transformer.xml b/spring-integration-reference/src/transformer.xml index b710bd4bbd..e4880c3c6a 100644 --- a/spring-integration-reference/src/transformer.xml +++ b/spring-integration-reference/src/transformer.xml @@ -35,7 +35,26 @@ and "output-channel" attributes, it requires a "ref". The "ref" may either point to an Object that contains the @Transformer annotation on a single method (see below) or it may be combined with an explicit method name value provided via the "method" attribute. + +]]> + + Using a "ref" attribute is generally recommended if custom transformer handler implementation can be reused in other <transformer> definitions. However +if custom transformer handler implementation has to be scoped to a concrete definition of the <transformer>, starting with v1.0.3, Spring Integration supports +inner bean definitions for custom transformer handlers within the <transformer> element: + + +]]> + + + + Using both "ref" attribute and inner handler definition in the same <transformer> configuration + is not allowed, as it creates an ambiguous condition and will result in Exception being thrown + + + The method that is used for transformation may expect either the Message type or the payload type of inbound Messages. The return value of the method can be any type. If the return value is @@ -43,6 +62,11 @@ If the return value is null, then no reply Message will be sent (effectively the same behavior as a Message Filter). Otherwise, the return value will be sent as the payload of a Message. + + Using both "ref" attribute and inner handler definition in the same <router> configuration is not + allowed, as it creates an ambiguous condition and will result in Exception being thrown + +