1 23 24 29 30 package com.sun.enterprise.admin.monitor.stats.spi; 31 import javax.management.j2ee.statistics.*; 32 import com.sun.enterprise.admin.monitor.stats.*; 33 34 public class StatisticFactory { 35 36 37 public StatisticFactory() { 38 } 39 40 44 public static CountStatistic getCountStatistic(long countVal, String name, 45 String unit, String desc, 46 long sampleTime, long startTime) { 47 48 return new CountStatisticImpl(countVal, name, unit, desc, 49 sampleTime, startTime); 50 } 51 52 56 public static RangeStatistic getRangeStatistic(long curVal, long highMark, 57 long lowMark, String name, 58 String unit, String desc, 59 long startTime, long sampleTime) { 60 61 return new RangeStatisticImpl(curVal, highMark, lowMark, name, 62 unit, desc, startTime, sampleTime); 63 } 64 65 69 public static BoundaryStatistic getBoundaryStatistic(long lower, long upper, 70 String name, String unit, 71 String desc, long startTime, 72 long sampleTime) { 73 74 return new BoundaryStatisticImpl(lower, upper, name, unit, desc, 75 startTime, sampleTime); 76 } 77 78 82 public static BoundedRangeStatistic getBoundedRangeStatistic(long curVal, long highMark, 83 long lowMark, long upper, 84 long lower, String name, 85 String unit, String desc, 86 long startTime, long sampleTime) { 87 88 return new BoundedRangeStatisticImpl(curVal, highMark, lowMark, 89 upper, lower, name, unit, 90 desc, startTime, sampleTime); 91 } 92 93 97 public static TimeStatistic getTimeStatistic(long counter, long maxTime, 98 long minTime, long totalTime, 99 String name, String unit, 100 String desc, long startTime, 101 long sampleTime) { 102 103 return new TimeStatisticImpl(counter, maxTime, minTime, totalTime, 104 name, unit, desc, startTime, sampleTime); 105 106 } 107 } 108 | Popular Tags |