01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package org.jboss.management.j2ee.statistics;
23:
24: import javax.management.j2ee.statistics.BoundaryStatistic;
25:
26: /**
27: * This class is the JBoss specific Boundary Statistics class allowing
28: * just to increase and resetStats the instance.
29: *
30: * @author <a href="mailto:mclaugs@comcast.net">Scott McLaughlin</a>
31: * @version $Revision: 57197 $
32: */
33: public class BoundaryStatisticImpl extends StatisticImpl implements
34: BoundaryStatistic {
35: // -------------------------------------------------------------------------
36: // Constants
37: // -------------------------------------------------------------------------
38:
39: /** @since 4.0.2 */
40: private static final long serialVersionUID = 4718840772715705031L;
41:
42: // -------------------------------------------------------------------------
43: // Members
44: // -------------------------------------------------------------------------
45:
46: protected long mLowerBound;
47: protected long mUpperBound;
48:
49: // -------------------------------------------------------------------------
50: // Constructors
51: // -------------------------------------------------------------------------
52:
53: /**
54: * Default (no-args) constructor
55: */
56: public BoundaryStatisticImpl(String pName, String pUnit,
57: String pDescription, long lowerBound, long upperBound) {
58: super (pName, pUnit, pDescription);
59: mLowerBound = lowerBound;
60: mUpperBound = upperBound;
61: }
62:
63: // -------------------------------------------------------------------------
64: // BoundaryStatistic Implementation
65: // -------------------------------------------------------------------------
66:
67: /**
68: * @return The value of LowerBound
69: */
70: public long getLowerBound() {
71: return mLowerBound;
72: }
73:
74: /**
75: * @return The value of UpperBound
76: */
77: public long getUpperBound() {
78: return mUpperBound;
79: }
80:
81: /**
82: * @return Debug Information about this Instance
83: */
84: public String toString() {
85: return "BoundryStatistics[ " + getLowerBound() + ", "
86: + getUpperBound() + ", " + super .toString() + " ]";
87: }
88:
89: }
|