1 23 24 28 29 34 35 package com.sun.enterprise.admin.monitor.stats; 36 import javax.management.j2ee.statistics.Statistic ; 37 import java.io.Serializable ; 38 import com.sun.enterprise.util.i18n.StringManager; 39 40 47 48 public abstract class StatisticImpl implements Statistic ,Serializable { 49 50 private String statisticName; 51 private String statisticDesc; 52 private String statisticUnit; 53 private long startTime; 54 private long sampleTime; 55 56 57 public static String DEFAULT_UNIT = null; 58 public static StringManager localStrMgr = null; 59 60 public static final long DEFAULT_VALUE = java.math.BigInteger.ZERO.longValue(); 61 62 static { 63 localStrMgr = StringManager.getManager(StatisticImpl.class); 64 DEFAULT_UNIT = localStrMgr.getString("count_string"); 65 } 66 67 75 protected StatisticImpl(String name, String unit, String desc, 76 long start_time, long sample_time) { 77 78 statisticName = name; 79 statisticUnit = unit; 80 statisticDesc = desc; 81 startTime = start_time; 82 sampleTime = sample_time; 83 } 84 85 88 public String getName() { 89 return this.statisticName; 90 } 91 92 95 public String getDescription() { 96 return this.statisticDesc; 97 } 98 99 102 public String getUnit() { 103 return this.statisticUnit; 104 } 105 106 109 public long getLastSampleTime() { 110 return this.sampleTime; 111 } 112 113 116 public long getStartTime() { 117 return this.startTime; 118 } 119 120 123 public void setDescription(final String desc) { 124 this.statisticDesc = desc; 125 } 126 } 127 | Popular Tags |