KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > management > j2ee > statistics > BoundaryStatisticImpl


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * 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 JavaDoc;
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: 37459 $
32  */

33 public class BoundaryStatisticImpl
34         extends StatisticImpl
35         implements BoundaryStatistic JavaDoc
36 {
37    // -------------------------------------------------------------------------
38
// Constants
39
// -------------------------------------------------------------------------
40

41    /** @since 4.0.2 */
42    private static final long serialVersionUID = 4718840772715705031L;
43    
44    // -------------------------------------------------------------------------
45
// Members
46
// -------------------------------------------------------------------------
47

48    protected long mLowerBound;
49    protected long mUpperBound;
50
51    // -------------------------------------------------------------------------
52
// Constructors
53
// -------------------------------------------------------------------------
54

55    /**
56     * Default (no-args) constructor
57     */

58    public BoundaryStatisticImpl(String JavaDoc pName, String JavaDoc pUnit, String JavaDoc pDescription,
59                                 long lowerBound, long upperBound)
60    {
61       super(pName, pUnit, pDescription);
62       mLowerBound = lowerBound;
63       mUpperBound = upperBound;
64    }
65
66    // -------------------------------------------------------------------------
67
// BoundaryStatistic Implementation
68
// -------------------------------------------------------------------------
69

70    /**
71     * @return The value of LowerBound
72     */

73    public long getLowerBound()
74    {
75       return mLowerBound;
76    }
77
78    /**
79     * @return The value of UpperBound
80     */

81    public long getUpperBound()
82    {
83       return mUpperBound;
84    }
85
86    /**
87     * @return Debug Information about this Instance
88     */

89    public String JavaDoc toString()
90    {
91       return "BoundryStatistics[ " + getLowerBound() + ", " +
92               getUpperBound() + ", " + super.toString() + " ]";
93    }
94
95 }
96
Popular Tags