001 /** 002 * 003 * Copyright 2004 Protique Ltd 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 * 017 **/ 018 package org.activemq.management; 019 020 021 /** 022 * A boundary statistic implementation 023 * 024 * @version $Revision: 1.1.1.1 $ 025 */ 026 public class BoundaryStatisticImpl extends StatisticImpl { 027 private long lowerBound; 028 private long upperBound; 029 030 public BoundaryStatisticImpl(String name, String unit, String description, long lowerBound, long upperBound) { 031 super(name, unit, description); 032 this.lowerBound = lowerBound; 033 this.upperBound = upperBound; 034 } 035 036 public long getLowerBound() { 037 return lowerBound; 038 } 039 040 public long getUpperBound() { 041 return upperBound; 042 } 043 044 protected void appendFieldDescription(StringBuffer buffer) { 045 buffer.append(" lowerBound: "); 046 buffer.append(Long.toString(lowerBound)); 047 buffer.append(" upperBound: "); 048 buffer.append(Long.toString(upperBound)); 049 super.appendFieldDescription(buffer); 050 } 051 }