From a0b71d867f926d60078331b620e883632bcdf1a4 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Fri, 13 Nov 2009 15:40:17 +0000 Subject: [PATCH] Removed javadoc refs to JMX commons attribute source --- .../assembler/MetadataMBeanInfoAssembler.java | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java b/org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java index e65c478b29..743e8b7312 100644 --- a/org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java +++ b/org.springframework.context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java @@ -45,26 +45,22 @@ import org.springframework.util.StringUtils; * *

Uses the {@link JmxAttributeSource} strategy interface, so that * metadata can be read using any supported implementation. Out of the box, - * two strategies are included: - *

+ * Spring provides an implementation based on JDK 1.5+ annotations, + * AnnotationJmxAttributeSource. * * @author Rob Harrop * @author Juergen Hoeller * @author Jennifer Hickey * @since 1.2 * @see #setAttributeSource - * @see org.springframework.jmx.export.metadata.AttributesJmxAttributeSource * @see org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource */ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssembler implements AutodetectCapableMBeanInfoAssembler, InitializingBean { private JmxAttributeSource attributeSource; - - + + /** * Create a new MetadataMBeanInfoAssembler which needs to be * configured through the {@link #setAttributeSource} method. @@ -86,7 +82,6 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem /** * Set the JmxAttributeSource implementation to use for * reading the metadata from the bean class. - * @see org.springframework.jmx.export.metadata.AttributesJmxAttributeSource * @see org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource */ public void setAttributeSource(JmxAttributeSource attributeSource) { @@ -169,7 +164,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem private boolean hasManagedAttribute(Method method) { return (this.attributeSource.getManagedAttribute(method) != null); } - + /** * Checks to see if the given Method has the ManagedMetric attribute. */ @@ -217,12 +212,12 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem else if (setter != null && StringUtils.hasText(setter.getDescription())) { return setter.getDescription(); } - + ManagedMetric metric = (readMethod != null) ? this.attributeSource.getManagedMetric(readMethod) : null; if(metric != null && StringUtils.hasText(metric.getDescription())) { return metric.getDescription(); } - + return propertyDescriptor.getDisplayName(); } @@ -350,7 +345,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem populateAttributeDescriptor(desc,gma,sma); } } - + private void populateAttributeDescriptor(Descriptor desc, ManagedAttribute gma, ManagedAttribute sma) { applyCurrencyTimeLimit(desc, resolveIntDescriptor(gma.getCurrencyTimeLimit(), sma.getCurrencyTimeLimit())); @@ -366,29 +361,29 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem desc.setField(FIELD_PERSIST_PERIOD, Integer.toString(persistPeriod)); } } - + private void populateMetricDescriptor(Descriptor desc, ManagedMetric metric) { applyCurrencyTimeLimit(desc, metric.getCurrencyTimeLimit()); - + if (StringUtils.hasLength(metric.getPersistPolicy())) { desc.setField(FIELD_PERSIST_POLICY, metric.getPersistPolicy()); } if (metric.getPersistPeriod() >= 0) { desc.setField(FIELD_PERSIST_PERIOD, Integer.toString(metric.getPersistPeriod())); } - + if (StringUtils.hasLength(metric.getDisplayName())) { desc.setField(FIELD_DISPLAY_NAME, metric.getDisplayName()); } - + if(StringUtils.hasLength(metric.getUnit())) { desc.setField(FIELD_UNITS, metric.getUnit()); } - + if(StringUtils.hasLength(metric.getCategory())) { desc.setField(FIELD_METRIC_CATEGORY, metric.getCategory()); } - + String metricType = (metric.getMetricType() == null) ? MetricType.GAUGE.toString() : metric.getMetricType().toString(); desc.setField(FIELD_METRIC_TYPE, metricType); }