@ -1,3 +1,19 @@
@@ -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;
@@ -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 {
@@ -25,100 +41,89 @@ public class ManagedMetric extends AbstractJmxAttribute {
private String unit = "" ;
/ * *
*
* @return The category of this metric ( ex . throughput , performance , utilization )
* The category of this metric ( ex . throughput , performance , utilization ) .
* /
public String getCategory ( ) {
return category ;
public void setCategory ( String category ) {
this . category = category ;
}
/ * *
*
* @return A display name for this metric
* The category of this metric ( ex . throughput , performance , utilization ) .
* /
public String getDisplayName ( ) {
return displayName ;
public String getCategory ( ) {
return this . category ;
}
/ * *
*
* @return A description of how this metric ' s values change over time
* A display name for this metric .
* /
public MetricType getMetricType ( ) {
return metricTyp e;
public void setDisplayName ( String displayName ) {
this . displayName = displayNam e;
}
/ * *
*
* @return The persist period for this metric
* A display name for this metric .
* /
public int getPersistPeriod ( ) {
return persistPeriod ;
public String getDisplayName ( ) {
return this . displayName ;
}
/ * *
*
* @return The persist policy for this metric
* A description of how this metric ' s values change over time .
* /
public String getPersistPolicy ( ) {
return persistPolicy ;
public void setMetricType ( MetricType metricType ) {
this . metricType = metricType ;
}
/ * *
*
* @return The expected unit of measurement values
* A description of how this metric ' s values change over time .
* /
public String getUnit ( ) {
return unit ;
public MetricType getMetricType ( ) {
return this . metricType ;
}
/ * *
*
* @param category The category of this metric ( ex . throughput , performance , utilization )
* The persist period for this metric .
* /
public void setCategory ( String category ) {
this . category = category ;
public void setPersistPeriod ( int persistPeriod ) {
this . persistPeriod = persistPeriod ;
}
/ * *
*
* @param displayName A display name for this metric
* The persist period for this metric .
* /
public void setDisplayName ( String displayName ) {
this . displayName = displayName ;
public int getPersistPeriod ( ) {
return this . persistPeriod ;
}
/ * *
*
* @param metricType A description of how this metric ' s values change over time
* The persist policy for this metric .
* /
public void setMetricType ( MetricType metricType ) {
this . metricType = metricType ;
public void setPersistPolicy ( String persistPolicy ) {
this . persistPolicy = persistPolicy ;
}
/ * *
*
* @param persistPeriod The persist period for this metric
* The persist policy for this metric .
* /
public void setPersistPeriod ( int persistPeriod ) {
this . persistPeriod = persistPeriod ;
public String getPersistPolicy ( ) {
return this . persistPolicy ;
}
/ * *
*
* @param persistPolicy The persist policy for this metric
* The expected unit of measurement values .
* /
public void setPersistPolicy ( String persistPolicy ) {
this . persistPolicy = persistPolicy ;
public void setUnit ( String unit ) {
this . unit = unit ;
}
/ * *
*
* @param unit The expected unit of measurement values
* The expected unit of measurement values .
* /
public void setUnit ( String unit ) {
this . unit = unit ;
public String getUnit ( ) {
return this . unit ;
}
}