01: /*
02: * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25:
26: package sun.jvmstat.monitor;
27:
28: import sun.management.counter.Units;
29: import sun.management.counter.Variability;
30:
31: /**
32: * Interface provided by Instrumentation Monitoring Objects.
33: *
34: * @author Brian Doherty
35: * @version 1.8, 05/05/07
36: * @since 1.5
37: */
38: public interface Monitor {
39:
40: /**
41: * Returns the name of this instrumentation object.
42: *
43: * @return String - the name assigned to this instrumentation monitoring
44: * object
45: */
46: String getName();
47:
48: /**
49: * Returns the base name of this instrumentation object.
50: * The base name is the component of the name following the last
51: * "." character in the name.
52: *
53: * @return String - the base name of the name assigned to this
54: * instrumentation monitoring object.
55: */
56: String getBaseName();
57:
58: /**
59: * Returns the Units for this instrumentation monitoring object.
60: *
61: * @return Units - the units of measure attribute
62: */
63: Units getUnits();
64:
65: /**
66: * Returns the Variability for this instrumentation object.
67: *
68: *@return Variability - the variability attribute
69: */
70: Variability getVariability();
71:
72: /**
73: * Test if the instrumentation object is a vector type.
74: *
75: * @return boolean - true if this instrumentation object is a vector type,
76: * false otherwise.
77: */
78: boolean isVector();
79:
80: /**
81: * Return the length of the vector.
82: * @return int - the length of the vector or zero if this instrumentation
83: * object is a scalar type.
84: */
85: int getVectorLength();
86:
87: /**
88: * Test if the instrumentation object is supported.
89: */
90: boolean isSupported();
91:
92: /**
93: * Return an Object that encapsulates this instrumentation object's
94: * current data value.
95: */
96: Object getValue();
97: }
|