INT-1495: harmonise schema

This commit is contained in:
Dave Syer
2010-10-06 07:10:12 -07:00
parent 76d17bd187
commit cbf0242bd9
13 changed files with 18 additions and 17 deletions

View File

@@ -39,7 +39,7 @@ public class AttributePollingChannelAdapterParser extends AbstractPollingInbound
protected String parseSource(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(
"org.springframework.integration.jmx.AttributePollingMessageSource");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "mbean-server", "server");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "server", "server");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "object-name");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "attribute-name");
return BeanDefinitionReaderUtils.registerWithGeneratedName(

View File

@@ -33,7 +33,7 @@ public class JmxNamespaceHandler extends AbstractIntegrationNamespaceHandler {
this.registerBeanDefinitionParser("attribute-polling-channel-adapter", new AttributePollingChannelAdapterParser());
this.registerBeanDefinitionParser("notification-listening-channel-adapter", new NotificationListeningChannelAdapterParser());
this.registerBeanDefinitionParser("notification-publishing-channel-adapter", new NotificationPublishingChannelAdapterParser());
this.registerBeanDefinitionParser("mbean-exporter", new MBeanExporterParser());
this.registerBeanDefinitionParser("mbean-export", new MBeanExporterParser());
this.registerBeanDefinitionParser("control-bus", new ControlBusParser());
}

View File

@@ -51,7 +51,7 @@ public class MBeanExporterParser extends AbstractSingleBeanDefinitionParser {
}
private Object getMBeanServer(Element element, ParserContext parserContext) {
String mbeanServer = element.getAttribute("mbean-server");
String mbeanServer = element.getAttribute("server");
if (StringUtils.hasText(mbeanServer)) {
return new RuntimeBeanReference(mbeanServer);
}

View File

@@ -48,7 +48,7 @@ public class NotificationListeningChannelAdapterParser extends AbstractSimpleBea
parserContext.getReaderContext().error("The 'channel' attribute is required.", source);
}
builder.addPropertyReference("outputChannel", channel);
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "mbean-server", "server");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "server");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "notification-filter", "filter");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "handback");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "send-timeout");

View File

@@ -39,7 +39,7 @@ public class OperationInvokingChannelAdapterParser extends AbstractOutboundChann
protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(
"org.springframework.integration.jmx.OperationInvokingMessageHandler");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "mbean-server", "server");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "server");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "object-name");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "operation-name");
return builder.getBeanDefinition();

View File

@@ -37,7 +37,7 @@ public class OperationInvokingOutboundGatewayParser extends AbstractConsumerEndp
ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(
"org.springframework.integration.jmx.OperationInvokingMessageHandler");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "mbean-server", "server");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "server");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "object-name");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "operation-name");
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "reply-channel", "outputChannel");