2
|
1 |
/*
|
|
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 |
|
|
26 |
package javax.management.monitor;
|
|
27 |
|
|
28 |
// jmx imports
|
|
29 |
//
|
|
30 |
import javax.management.ObjectName;
|
|
31 |
|
|
32 |
/**
|
|
33 |
* Exposes the remote management interface of the counter monitor MBean.
|
|
34 |
*
|
|
35 |
*
|
|
36 |
* @since 1.5
|
|
37 |
*/
|
|
38 |
public interface CounterMonitorMBean 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 threshold value.
|
|
63 |
*
|
|
64 |
* @return The threshold value.
|
|
65 |
*
|
|
66 |
* @see #setThreshold(Number)
|
|
67 |
*
|
|
68 |
* @deprecated As of JMX 1.2, replaced by {@link #getThreshold(ObjectName)}
|
|
69 |
*/
|
|
70 |
@Deprecated
|
|
71 |
public Number getThreshold();
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Sets the threshold value.
|
|
75 |
*
|
|
76 |
* @see #getThreshold()
|
|
77 |
*
|
|
78 |
* @param value The threshold value.
|
|
79 |
* @exception java.lang.IllegalArgumentException The specified threshold is null or the threshold value is less than zero.
|
|
80 |
* @deprecated As of JMX 1.2, replaced by {@link #setInitThreshold}
|
|
81 |
*/
|
|
82 |
@Deprecated
|
|
83 |
public void setThreshold(Number value) throws java.lang.IllegalArgumentException;
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Gets the derived gauge for the specified MBean.
|
|
87 |
*
|
|
88 |
* @param object the MBean for which the derived gauge is to be returned
|
|
89 |
* @return The derived gauge for the specified MBean if this MBean is in the
|
|
90 |
* set of observed MBeans, or <code>null</code> otherwise.
|
|
91 |
*
|
|
92 |
*/
|
|
93 |
public Number getDerivedGauge(ObjectName object);
|
|
94 |
|
|
95 |
/**
|
|
96 |
* Gets the derived gauge timestamp for the specified MBean.
|
|
97 |
*
|
|
98 |
* @param object the MBean for which the derived gauge timestamp is to be returned
|
|
99 |
* @return The derived gauge timestamp for the specified MBean if this MBean
|
|
100 |
* is in the set of observed MBeans, or <code>null</code> otherwise.
|
|
101 |
*
|
|
102 |
*/
|
|
103 |
public long getDerivedGaugeTimeStamp(ObjectName object);
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Gets the threshold value for the specified MBean.
|
|
107 |
*
|
|
108 |
* @param object the MBean for which the threshold value is to be returned
|
|
109 |
* @return The threshold value for the specified MBean if this MBean
|
|
110 |
* is in the set of observed MBeans, or <code>null</code> otherwise.
|
|
111 |
*
|
|
112 |
* @see #setThreshold
|
|
113 |
*
|
|
114 |
*/
|
|
115 |
public Number getThreshold(ObjectName object);
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Gets the initial threshold value common to all observed objects.
|
|
119 |
*
|
|
120 |
* @return The initial threshold value.
|
|
121 |
*
|
|
122 |
* @see #setInitThreshold
|
|
123 |
*
|
|
124 |
*/
|
|
125 |
public Number getInitThreshold();
|
|
126 |
|
|
127 |
/**
|
|
128 |
* Sets the initial threshold value common to all observed MBeans.
|
|
129 |
*
|
|
130 |
* @param value The initial threshold value.
|
|
131 |
* @exception java.lang.IllegalArgumentException The specified
|
|
132 |
* threshold is null or the threshold value is less than zero.
|
|
133 |
*
|
|
134 |
* @see #getInitThreshold
|
|
135 |
*
|
|
136 |
*/
|
|
137 |
public void setInitThreshold(Number value) throws java.lang.IllegalArgumentException;
|
|
138 |
|
|
139 |
/**
|
|
140 |
* Gets the offset value.
|
|
141 |
*
|
|
142 |
* @see #setOffset(Number)
|
|
143 |
*
|
|
144 |
* @return The offset value.
|
|
145 |
*/
|
|
146 |
public Number getOffset();
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Sets the offset value.
|
|
150 |
*
|
|
151 |
* @param value The offset value.
|
|
152 |
* @exception java.lang.IllegalArgumentException The specified
|
|
153 |
* offset is null or the offset value is less than zero.
|
|
154 |
*
|
|
155 |
* @see #getOffset()
|
|
156 |
*/
|
|
157 |
public void setOffset(Number value) throws java.lang.IllegalArgumentException;
|
|
158 |
|
|
159 |
/**
|
|
160 |
* Gets the modulus value.
|
|
161 |
*
|
|
162 |
* @return The modulus value.
|
|
163 |
*
|
|
164 |
* @see #setModulus
|
|
165 |
*/
|
|
166 |
public Number getModulus();
|
|
167 |
|
|
168 |
/**
|
|
169 |
* Sets the modulus value.
|
|
170 |
*
|
|
171 |
* @param value The modulus value.
|
|
172 |
* @exception java.lang.IllegalArgumentException The specified
|
|
173 |
* modulus is null or the modulus value is less than zero.
|
|
174 |
*
|
|
175 |
* @see #getModulus
|
|
176 |
*/
|
|
177 |
public void setModulus(Number value) throws java.lang.IllegalArgumentException;
|
|
178 |
|
|
179 |
/**
|
|
180 |
* Gets the notification's on/off switch value.
|
|
181 |
*
|
|
182 |
* @return <CODE>true</CODE> if the counter monitor notifies when
|
|
183 |
* exceeding the threshold, <CODE>false</CODE> otherwise.
|
|
184 |
*
|
|
185 |
* @see #setNotify
|
|
186 |
*/
|
|
187 |
public boolean getNotify();
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Sets the notification's on/off switch value.
|
|
191 |
*
|
|
192 |
* @param value The notification's on/off switch value.
|
|
193 |
*
|
|
194 |
* @see #getNotify
|
|
195 |
*/
|
|
196 |
public void setNotify(boolean value);
|
|
197 |
|
|
198 |
/**
|
|
199 |
* Gets the difference mode flag value.
|
|
200 |
*
|
|
201 |
* @return <CODE>true</CODE> if the difference mode is used,
|
|
202 |
* <CODE>false</CODE> otherwise.
|
|
203 |
*
|
|
204 |
* @see #setDifferenceMode
|
|
205 |
*/
|
|
206 |
public boolean getDifferenceMode();
|
|
207 |
|
|
208 |
/**
|
|
209 |
* Sets the difference mode flag value.
|
|
210 |
*
|
|
211 |
* @param value The difference mode flag value.
|
|
212 |
*
|
|
213 |
* @see #getDifferenceMode
|
|
214 |
*/
|
|
215 |
public void setDifferenceMode(boolean value);
|
|
216 |
}
|