1 23 24 package com.sun.enterprise.resource.monitor; 25 26 import javax.management.j2ee.statistics.RangeStatistic ; 27 import javax.management.j2ee.statistics.Statistic ; 28 29 import com.sun.enterprise.admin.monitor.stats.GenericStatsImpl; 30 import com.sun.enterprise.admin.monitor.stats.RangeStatisticImpl; 31 32 36 public class AbstractStatsImpl { 37 protected GenericStatsImpl gsImpl; 39 40 46 public Statistic [] getStatistics() { 47 return gsImpl.getStatistics(); 48 } 49 50 56 public Statistic getStatistic( String str ) { 57 return gsImpl.getStatistic( str ); 58 } 59 60 66 public String [] getStatisticNames() { 67 return gsImpl.getStatisticNames(); 68 } 69 70 73 protected RangeStatistic getUpdatedRangeStatistic 74 (RangeStatistic originalStat, long currentValue, 75 long maxValue, long minValue){ 76 return new RangeStatisticImpl(currentValue, maxValue, minValue, 77 originalStat.getName(), originalStat.getUnit(), 78 originalStat.getDescription(), originalStat.getStartTime(), 79 System.currentTimeMillis()); 80 } 81 } 82 | Popular Tags |