polishing

This commit is contained in:
Juergen Hoeller
2009-10-13 20:59:10 +00:00
parent 84447cdf94
commit b4ffdcdf18
6 changed files with 94 additions and 77 deletions

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.jmx.export.annotation;
import java.lang.annotation.Documented;
@@ -13,7 +29,6 @@ import org.springframework.jmx.support.MetricType;
* property as JMX attribute, with added Descriptor properties to indicate that
* it is a metric. Only valid when used on a JavaBean getter.
*
*
* @author Jennifer Hickey
* @since 3.0
* @see org.springframework.jmx.export.metadata.ManagedMetric
@@ -39,4 +54,4 @@ public @interface ManagedMetric {
String unit() default "";
}
}

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.jmx.export.metadata;
import org.springframework.jmx.support.MetricType;
@@ -6,7 +22,7 @@ import org.springframework.jmx.support.MetricType;
* Metadata that indicates to expose a given bean property as a JMX attribute,
* with additional descriptor properties that indicate that the attribute is a
* metric. Only valid when used on a JavaBean getter.
*
*
* @author Jennifer Hickey
* @since 3.0
* @see org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
@@ -25,100 +41,89 @@ public class ManagedMetric extends AbstractJmxAttribute {
private String unit = "";
/**
*
*@return The category of this metric (ex. throughput, performance, utilization)
*/
public String getCategory() {
return category;
}
/**
*
* @return A display name for this metric
*/
public String getDisplayName() {
return displayName;
}
/**
*
* @return A description of how this metric's values change over time
*/
public MetricType getMetricType() {
return metricType;
}
/**
*
* @return The persist period for this metric
*/
public int getPersistPeriod() {
return persistPeriod;
}
/**
*
* @return The persist policy for this metric
*/
public String getPersistPolicy() {
return persistPolicy;
}
/**
*
* @return The expected unit of measurement values
*/
public String getUnit() {
return unit;
}
/**
*
* @param category The category of this metric (ex. throughput, performance, utilization)
* The category of this metric (ex. throughput, performance, utilization).
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* @param displayName A display name for this metric
* The category of this metric (ex. throughput, performance, utilization).
*/
public String getCategory() {
return this.category;
}
/**
* A display name for this metric.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* @param metricType A description of how this metric's values change over time
* A display name for this metric.
*/
public String getDisplayName() {
return this.displayName;
}
/**
* A description of how this metric's values change over time.
*/
public void setMetricType(MetricType metricType) {
this.metricType = metricType;
}
/**
*
* @param persistPeriod The persist period for this metric
* A description of how this metric's values change over time.
*/
public MetricType getMetricType() {
return this.metricType;
}
/**
* The persist period for this metric.
*/
public void setPersistPeriod(int persistPeriod) {
this.persistPeriod = persistPeriod;
}
/**
*
* @param persistPolicy The persist policy for this metric
* The persist period for this metric.
*/
public int getPersistPeriod() {
return this.persistPeriod;
}
/**
* The persist policy for this metric.
*/
public void setPersistPolicy(String persistPolicy) {
this.persistPolicy = persistPolicy;
}
/**
*
* @param unit The expected unit of measurement values
* The persist policy for this metric.
*/
public String getPersistPolicy() {
return this.persistPolicy;
}
/**
* The expected unit of measurement values.
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* The expected unit of measurement values.
*/
public String getUnit() {
return this.unit;
}
}