1 23 24 28 29 34 35 package com.sun.enterprise.admin.monitor.util; 36 import javax.management.j2ee.statistics.*; 37 38 42 public class BoundedRangeStatisticMock extends StatisticMock implements BoundedRangeStatistic { 43 private long current=0; 44 private long highWater=0; 45 private long lowWater=0; 46 private long upperBound=0; 47 private long lowerBound=0; 48 49 50 public BoundedRangeStatisticMock(long current, long highWater, long lowWater, 51 long upperBound, long lowerBound, String name, 52 String unit, String desc, long sampleTime, 53 long startTime) { 54 super(name, unit, desc, startTime, sampleTime); 55 this.current=current; 56 this.highWater=highWater; 57 this.lowWater=lowWater; 58 this.upperBound=upperBound; 59 this.lowerBound=lowerBound; 60 } 61 62 public long getCurrent() { 63 System.out.println("returning current:"+current); 64 return current; 65 } 66 67 public long getHighWaterMark() { 68 return highWater; 69 } 70 71 public long getLowWaterMark() { 72 return lowWater; 73 } 74 75 public long getLowerBound() { 76 return lowerBound; 77 } 78 79 public long getUpperBound() { 80 return upperBound; 81 } 82 } 83 | Popular Tags |