01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.tools.stats;
10:
11: import java.lang.reflect.Method;
12:
13: import mx4j.MBeanDescriptionAdapter;
14:
15: /**
16: * Descriptions of the {@link StatisticsRecorderMBean} interface
17: *
18: * @version $Revision: 1.4 $
19: * @see PointTime
20: */
21: public class StatisticsRecorderMBeanDescription extends
22: MBeanDescriptionAdapter {
23: public String getAttributeDescription(String attribute) {
24: if (attribute.equals("Max")) {
25: return "Maximum observed value";
26: }
27: if (attribute.equals("Min")) {
28: return "Minimum observed value";
29: }
30: if (attribute.equals("Average")) {
31: return "Average of the observed values";
32: }
33: if (attribute.equals("MaxEntries")) {
34: return "Amount of values stored in memory";
35: }
36: if (attribute.equals("RecordingStart")) {
37: return "Date when the recording was inited";
38: }
39: if (attribute.equals("Entries")) {
40: return "SortedMap of the recorded values indexed by PointTime values";
41: }
42: if (attribute.equals("Active")) {
43: return "Indicates whether the MBean is recording";
44: }
45: return super .getAttributeDescription(attribute);
46: }
47:
48: public String getOperationDescription(Method operation) {
49: if (operation.equals("start")) {
50: return "Starts the recording";
51: }
52: if (operation.equals("stop")) {
53: return "Stops the recording";
54: }
55: return super.getOperationDescription(operation);
56: }
57: }
|