blob: 57f3d7461f43ba72f2a0760221540ef4d9f0231d [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * 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
26package javax.management.monitor;
27
28// jmx imports
29//
30import javax.management.ObjectName;
31
32/**
33 * Exposes the remote management interface of the gauge monitor MBean.
34 *
35 *
36 * @since 1.5
37 */
38public interface GaugeMonitorMBean extends MonitorMBean {
39
40 // GETTERS AND SETTERS
41 //--------------------
42
43 /**
44 * Gets the derived gauge.
45 *
46 * @return The derived gauge.
47 * @deprecated As of JMX 1.2, replaced by {@link #getDerivedGauge(ObjectName)}
48 */
49 @Deprecated
50 public Number getDerivedGauge();
51
52 /**
53 * Gets the derived gauge timestamp.
54 *
55 * @return The derived gauge timestamp.
56 * @deprecated As of JMX 1.2, replaced by {@link #getDerivedGaugeTimeStamp(ObjectName)}
57 */
58 @Deprecated
59 public long getDerivedGaugeTimeStamp();
60
61 /**
62 * Gets the derived gauge for the specified MBean.
63 *
64 * @param object the MBean for which the derived gauge is to be returned
65 * @return The derived gauge for the specified MBean if this MBean is in the
66 * set of observed MBeans, or <code>null</code> otherwise.
67 *
68 */
69 public Number getDerivedGauge(ObjectName object);
70
71 /**
72 * Gets the derived gauge timestamp for the specified MBean.
73 *
74 * @param object the MBean for which the derived gauge timestamp is to be returned
75 * @return The derived gauge timestamp for the specified MBean if this MBean
76 * is in the set of observed MBeans, or <code>null</code> otherwise.
77 *
78 */
79 public long getDerivedGaugeTimeStamp(ObjectName object);
80
81 /**
82 * Gets the high threshold value.
83 *
84 * @return The high threshold value.
85 */
86 public Number getHighThreshold();
87
88 /**
89 * Gets the low threshold value.
90 *
91 * @return The low threshold value.
92 */
93 public Number getLowThreshold();
94
95 /**
96 * Sets the high and the low threshold values.
97 *
98 * @param highValue The high threshold value.
99 * @param lowValue The low threshold value.
100 * @exception java.lang.IllegalArgumentException The specified high/low threshold is null
101 * or the low threshold is greater than the high threshold
102 * or the high threshold and the low threshold are not of the same type.
103 */
104 public void setThresholds(Number highValue, Number lowValue) throws java.lang.IllegalArgumentException;
105
106 /**
107 * Gets the high notification's on/off switch value.
108 *
109 * @return <CODE>true</CODE> if the gauge monitor notifies when
110 * exceeding the high threshold, <CODE>false</CODE> otherwise.
111 *
112 * @see #setNotifyHigh
113 */
114 public boolean getNotifyHigh();
115
116 /**
117 * Sets the high notification's on/off switch value.
118 *
119 * @param value The high notification's on/off switch value.
120 *
121 * @see #getNotifyHigh
122 */
123 public void setNotifyHigh(boolean value);
124
125 /**
126 * Gets the low notification's on/off switch value.
127 *
128 * @return <CODE>true</CODE> if the gauge monitor notifies when
129 * exceeding the low threshold, <CODE>false</CODE> otherwise.
130 *
131 * @see #setNotifyLow
132 */
133 public boolean getNotifyLow();
134
135 /**
136 * Sets the low notification's on/off switch value.
137 *
138 * @param value The low notification's on/off switch value.
139 *
140 * @see #getNotifyLow
141 */
142 public void setNotifyLow(boolean value);
143
144 /**
145 * Gets the difference mode flag value.
146 *
147 * @return <CODE>true</CODE> if the difference mode is used,
148 * <CODE>false</CODE> otherwise.
149 *
150 * @see #setDifferenceMode
151 */
152 public boolean getDifferenceMode();
153
154 /**
155 * Sets the difference mode flag value.
156 *
157 * @param value The difference mode flag value.
158 *
159 * @see #getDifferenceMode
160 */
161 public void setDifferenceMode(boolean value);
162}