1 8 9 package mx4j.tools.stats; 10 11 import java.lang.reflect.Method ; 12 13 import mx4j.MBeanDescriptionAdapter; 14 15 21 public class StatisticsRecorderMBeanDescription extends MBeanDescriptionAdapter 22 { 23 public String getAttributeDescription(String attribute) 24 { 25 if (attribute.equals("Max")) 26 { 27 return "Maximum observed value"; 28 } 29 if (attribute.equals("Min")) 30 { 31 return "Minimum observed value"; 32 } 33 if (attribute.equals("Average")) 34 { 35 return "Average of the observed values"; 36 } 37 if (attribute.equals("MaxEntries")) 38 { 39 return "Amount of values stored in memory"; 40 } 41 if (attribute.equals("RecordingStart")) 42 { 43 return "Date when the recording was inited"; 44 } 45 if (attribute.equals("Entries")) 46 { 47 return "SortedMap of the recorded values indexed by PointTime values"; 48 } 49 if (attribute.equals("Active")) 50 { 51 return "Indicates whether the MBean is recording"; 52 } 53 return super.getAttributeDescription(attribute); 54 } 55 56 public String getOperationDescription(Method operation) 57 { 58 if (operation.equals("start")) 59 { 60 return "Starts the recording"; 61 } 62 if (operation.equals("stop")) 63 { 64 return "Stops the recording"; 65 } 66 return super.getOperationDescription(operation); 67 } 68 } 69 | Popular Tags |