The <endpoint/> element now expects a "handler" attribute instead of "handler-ref".

This commit is contained in:
Mark Fisher
2008-04-22 18:17:05 +00:00
parent cb3c4fbdc3
commit 4b01a3a09c
16 changed files with 31 additions and 31 deletions

View File

@@ -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));

View File

@@ -139,7 +139,7 @@
</xsd:sequence>
<xsd:attribute name="input-channel" type="xsd:string" use="required"/>
<xsd:attribute name="default-output-channel" type="xsd:string"/>
<xsd:attribute name="handler-ref" type="xsd:string" use="required"/>
<xsd:attribute name="handler" type="xsd:string" use="required"/>
<xsd:attribute name="handler-method" type="xsd:string"/>
<xsd:attribute name="error-handler" type="xsd:string"/>
<xsd:attribute name="reply-handler" type="xsd:string"/>

View File

@@ -11,11 +11,11 @@
<channel id="testChannel"/>
<endpoint id="defaultConcurrencyEndpoint" input-channel="testChannel" handler-ref="testHandler">
<endpoint id="defaultConcurrencyEndpoint" input-channel="testChannel" handler="testHandler">
<concurrency/>
</endpoint>
<endpoint id="configuredConcurrencyEndpoint" input-channel="testChannel" handler-ref="testHandler">
<endpoint id="configuredConcurrencyEndpoint" input-channel="testChannel" handler="testHandler">
<concurrency core="7" max="77" queue-capacity="777" keep-alive="7777"/>
</endpoint>

View File

@@ -11,7 +11,7 @@
<channel id="testChannel"/>
<endpoint id="endpoint" input-channel="testChannel" handler-ref="testHandler" error-handler="errorHandler"/>
<endpoint id="endpoint" input-channel="testChannel" handler="testHandler" error-handler="errorHandler"/>
<beans:bean id="testHandler" class="org.springframework.integration.config.ExceptionThrowingTestHandler"/>

View File

@@ -19,7 +19,7 @@
<handler ref="handler3"/>
</handler-chain>
<endpoint input-channel="testChannel" handler-ref="chain" default-output-channel="replyChannel">
<endpoint input-channel="testChannel" handler="chain" default-output-channel="replyChannel">
<schedule period="100"/>
</endpoint>

View File

@@ -11,7 +11,7 @@
<channel id="testChannel"/>
<endpoint id="endpoint" input-channel="testChannel" handler-ref="testHandler" reply-handler="replyHandler"/>
<endpoint id="endpoint" input-channel="testChannel" handler="testHandler" reply-handler="replyHandler"/>
<beans:bean id="testHandler" class="org.springframework.integration.config.TestHandler">
<beans:property name="replyMessageText" value="foo"/>

View File

@@ -11,7 +11,7 @@
<channel id="testChannel" capacity="50"/>
<endpoint id="endpoint" input-channel="testChannel" handler-ref="testHandler">
<endpoint id="endpoint" input-channel="testChannel" handler="testHandler">
<schedule period="100"/>
<selector ref="typeSelector"/>
</endpoint>

View File

@@ -11,7 +11,7 @@
<channel id="testChannel" capacity="50"/>
<endpoint input-channel="testChannel" handler-ref="testBean" handler-method="store">
<endpoint input-channel="testChannel" handler="testBean" handler-method="store">
<schedule period="100"/>
</endpoint>

View File

@@ -13,9 +13,9 @@
<channel id="channel"/>
<endpoint id="endpoint1" handler-ref="testHandler" input-channel="channel"/>
<endpoint id="endpoint1" handler="testHandler" input-channel="channel"/>
<endpoint id="endpoint2" handler-ref="testHandler" input-channel="channel">
<endpoint id="endpoint2" handler="testHandler" input-channel="channel">
<concurrency core="14" max="17"/>
</endpoint>

View File

@@ -11,7 +11,7 @@
<channel id="testChannel" capacity="50"/>
<endpoint input-channel="testChannel" handler-ref="testHandler">
<endpoint input-channel="testChannel" handler="testHandler">
<schedule period="100"/>
</endpoint>