diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/EndpointParser.java b/spring-integration-core/src/main/java/org/springframework/integration/config/EndpointParser.java index 0389cf2d48..ffc7e3db30 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/EndpointParser.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/EndpointParser.java @@ -59,7 +59,7 @@ public class EndpointParser implements BeanDefinitionParser { private static final String REF_ATTRIBUTE = "ref"; - private static final String HANDLER_REF_ATTRIBUTE = "handler-ref"; + private static final String HANDLER_ATTRIBUTE = "handler"; private static final String HANDLER_METHOD_ATTRIBUTE = "handler-method"; @@ -85,9 +85,9 @@ public class EndpointParser implements BeanDefinitionParser { public BeanDefinition parse(Element element, ParserContext parserContext) { - String handlerRef = element.getAttribute(HANDLER_REF_ATTRIBUTE); + String handlerRef = element.getAttribute(HANDLER_ATTRIBUTE); if (!StringUtils.hasText(handlerRef)) { - throw new ConfigurationException("The 'handler-ref' attribute is required."); + throw new ConfigurationException("The '" + HANDLER_ATTRIBUTE + "' attribute is required."); } RootBeanDefinition endpointDef = new RootBeanDefinition(HandlerEndpoint.class); endpointDef.setSource(parserContext.extractSource(element)); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/spring-integration-core-1.0.xsd b/spring-integration-core/src/main/java/org/springframework/integration/config/spring-integration-core-1.0.xsd index 2db48435de..b73a8f4de1 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/spring-integration-core-1.0.xsd +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/spring-integration-core-1.0.xsd @@ -139,7 +139,7 @@ - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointConcurrencyTests.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointConcurrencyTests.xml index f64fff1024..4c910324af 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointConcurrencyTests.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointConcurrencyTests.xml @@ -11,11 +11,11 @@ - + - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithErrorHandler.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithErrorHandler.xml index 9122689d07..125055e815 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithErrorHandler.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithErrorHandler.xml @@ -11,7 +11,7 @@ - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithHandlerChainElement.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithHandlerChainElement.xml index 6efcbeddc2..77d8df6a04 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithHandlerChainElement.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithHandlerChainElement.xml @@ -19,7 +19,7 @@ - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithReplyHandler.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithReplyHandler.xml index 68348cd01e..e9b19abc69 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithReplyHandler.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithReplyHandler.xml @@ -11,7 +11,7 @@ - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithSelectors.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithSelectors.xml index 9c0a54c39a..fdf241d3fe 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithSelectors.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/endpointWithSelectors.xml @@ -11,7 +11,7 @@ - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/handlerAdapterEndpointTests.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/handlerAdapterEndpointTests.xml index 9ce14f3e9b..a18fb66d01 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/handlerAdapterEndpointTests.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/handlerAdapterEndpointTests.xml @@ -11,7 +11,7 @@ - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/messageBusWithDefaultConcurrencyTests.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/messageBusWithDefaultConcurrencyTests.xml index b4a24a4bb0..bf9e748fb9 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/messageBusWithDefaultConcurrencyTests.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/messageBusWithDefaultConcurrencyTests.xml @@ -13,9 +13,9 @@ - + - + diff --git a/spring-integration-core/src/test/java/org/springframework/integration/config/simpleEndpointTests.xml b/spring-integration-core/src/test/java/org/springframework/integration/config/simpleEndpointTests.xml index dea033720e..ce9816361f 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/config/simpleEndpointTests.xml +++ b/spring-integration-core/src/test/java/org/springframework/integration/config/simpleEndpointTests.xml @@ -11,7 +11,7 @@ - + diff --git a/spring-integration-reference/src/configuration.xml b/spring-integration-reference/src/configuration.xml index 690f9cf1e8..c2b5d6c785 100644 --- a/spring-integration-reference/src/configuration.xml +++ b/spring-integration-reference/src/configuration.xml @@ -124,15 +124,15 @@
Configuring Message Endpoints - To create a Message Endpoint instance, use the 'endpoint' element with the 'input-channel' and 'handler-ref' + To create a Message Endpoint instance, use the 'endpoint' element with the 'input-channel' and 'handler' attributes: - <endpoint input-channel="exampleChannel" handler-ref="exampleHandler"/> + <endpoint input-channel="exampleChannel" handler="exampleHandler"/> The configuration above assumes that "exampleHandler" is an actual implementation of the MessageHandler interface as described in . To delegate to an arbitrary method of any object, simply add the "handler-method" attribute. - <endpoint input-channel="exampleChannel" handler-ref="somePojo" handler-method="someMethod"/> + <endpoint input-channel="exampleChannel" handler="somePojo" handler-method="someMethod"/> In either case (MessageHandler or arbitrary object/method), when the handling @@ -146,7 +146,7 @@ neither is available, then a MessageHandlingException will be thrown. To configure the default output channel when using the XML namespace, provide the 'default-output-channel' attribute: <endpoint input-channel="exampleChannel" - handler-ref="somePojo" + handler="somePojo" handler-method="someMethod" default-output-channel="replyChannel"/> @@ -154,7 +154,7 @@ Endpoint's also support MessageSelectors as described in . To configure selectors with namespace support, simply add one or more <selector> sub-elements to the endpoint definition: - + ]]>]]>]]> @@ -164,7 +164,7 @@ endpoint subscriptions for its channel and delegates to a scheduler for managing the tasks that pull messages from the channel and push them to the endpoints. To configure the polling period for an individual endpoint's schedule, provide a 'schedule' sub-element with the 'period' in milliseconds: - + ]]>]]>]]> @@ -182,7 +182,7 @@ consider (the other major factor being the expected volume on the channel to which the endpoint subscribes). To enable concurrency for an endpoint that is configured with the XML namespace support, provide the 'concurrency' sub-element and one or more of the properties shown below: - + ]]>]]>]]> Recall the default concurrency policy values as listed in . diff --git a/spring-integration-reference/src/samples.xml b/spring-integration-reference/src/samples.xml index 8861acea5b..27cee61c4f 100644 --- a/spring-integration-reference/src/samples.xml +++ b/spring-integration-reference/src/samples.xml @@ -49,10 +49,10 @@ - - @@ -163,9 +163,9 @@ public class Barista { However, by configuring the endpoint concurrency, you can dramatically change the results. For example, on my machine, the following single modification causes all 100 hot drinks to be prepared before the 4th cold drink is ready: - + - + ]]>]]>]]> diff --git a/spring-integration-samples/scripts/cafeDemo.xml b/spring-integration-samples/scripts/cafeDemo.xml index eed7e735dc..d999af352e 100644 --- a/spring-integration-samples/scripts/cafeDemo.xml +++ b/spring-integration-samples/scripts/cafeDemo.xml @@ -20,8 +20,8 @@ - - + + diff --git a/spring-integration-samples/src/main/java/org/springframework/integration/samples/cafe/cafeDemo.xml b/spring-integration-samples/src/main/java/org/springframework/integration/samples/cafe/cafeDemo.xml index eed7e735dc..d999af352e 100644 --- a/spring-integration-samples/src/main/java/org/springframework/integration/samples/cafe/cafeDemo.xml +++ b/spring-integration-samples/src/main/java/org/springframework/integration/samples/cafe/cafeDemo.xml @@ -20,8 +20,8 @@ - - + + diff --git a/spring-integration-samples/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo.xml b/spring-integration-samples/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo.xml index 6c687b524a..2bf9be1813 100644 --- a/spring-integration-samples/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo.xml +++ b/spring-integration-samples/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo.xml @@ -19,7 +19,7 @@ channel="channel1" poll-period="10000"/> + handler="exclaimer" handler-method="exclaim"/> diff --git a/spring-integration-samples/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml b/spring-integration-samples/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml index 31ab8da15e..f33c8b5774 100644 --- a/spring-integration-samples/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml +++ b/spring-integration-samples/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml @@ -11,7 +11,7 @@