001: /* JFox, the OpenSource J2EE Application Server
002: *
003: * Copyright (C) 2002 huihoo.org
004: * Distributable under GNU LGPL license
005: * See the GNU Lesser General Public License for more details.
006: */
007:
008: package javax.management.monitor;
009:
010: import javax.management.ObjectName;
011:
012: /**
013: * Exposes the remote management interface of the counter monitor MBean.
014: *
015: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
016: */
017:
018: public interface CounterMonitorMBean extends MonitorMBean {
019:
020: /**
021: * Gets the derived gauge for the specified MBean.
022: *
023: * @param object the MBean for which the derived gauge is to be returned
024: * @return The derived gauge for the specified MBean if this MBean is in the
025: * set of observed MBeans, or <code>null</code> otherwise.
026: *
027: * @since JMX 1.2
028: */
029: public Number getDerivedGauge(ObjectName object);
030:
031: /**
032: * Gets the derived gauge timestamp for the specified MBean.
033: *
034: * @param object the MBean for which the derived gauge timestamp is to be returned
035: * @return The derived gauge timestamp for the specified MBean if this MBean
036: * is in the set of observed MBeans, or <code>null</code> otherwise.
037: *
038: * @since JMX 1.2
039: */
040: public long getDerivedGaugeTimeStamp(ObjectName object);
041:
042: /**
043: * Gets the threshold value for the specified MBean.
044: *
045: * @param object the MBean for which the threashold value is to be returned
046: * @return The threshold value for the specified MBean if this MBean
047: * is in the set of observed MBeans, or <code>null</code> otherwise.
048: *
049: * @since JMX 1.2
050: *
051: */
052: public Number getThreshold(ObjectName object);
053:
054: /**
055: * Gets the initial threshold value common to all observed objects.
056: *
057: * @return The initial threshold value.
058: *
059: * @see #setInitThreshold
060: *
061: * @since JMX 1.2
062: */
063: public Number getInitThreshold();
064:
065: /**
066: * Sets the initial threshold value common to all observed MBeans.
067: *
068: * @param value The initial threshold value.
069: * @exception java.lang.IllegalArgumentException The specified
070: * threshold is null or the threshold value is less than zero.
071: *
072: * @see #getInitThreshold
073: *
074: * @since JMX 1.2
075: */
076: public void setInitThreshold(Number value)
077: throws java.lang.IllegalArgumentException;
078:
079: /**
080: * Gets the offset value.
081: *
082: * @see #setOffset(Number)
083: *
084: * @return The offset value.
085: */
086: public Number getOffset();
087:
088: /**
089: * Sets the offset value.
090: *
091: * @param value The offset value.
092: * @exception java.lang.IllegalArgumentException The specified
093: * offset is null or the offset value is less than zero.
094: *
095: * @see #getOffset()
096: */
097: public void setOffset(Number value)
098: throws java.lang.IllegalArgumentException;
099:
100: /**
101: * Gets the modulus value.
102: *
103: * @return The modulus value.
104: *
105: * @see #setModulus
106: */
107: public Number getModulus();
108:
109: /**
110: * Sets the modulus value.
111: *
112: * @param value The modulus value.
113: * @exception java.lang.IllegalArgumentException The specified
114: * modulus is null or the modulus value is less than zero.
115: *
116: * @see #getModulus
117: */
118: public void setModulus(Number value)
119: throws java.lang.IllegalArgumentException;
120:
121: /**
122: * Gets the notification's on/off switch value.
123: *
124: * @return <CODE>true</CODE> if the counter monitor notifies when
125: * exceeding the threshold, <CODE>false</CODE> otherwise.
126: *
127: * @see #setNotify
128: */
129: public boolean getNotify();
130:
131: /**
132: * Sets the notification's on/off switch value.
133: *
134: * @param value The notification's on/off switch value.
135: *
136: * @see #getNotify
137: */
138: public void setNotify(boolean value);
139:
140: /**
141: * Gets the difference mode flag value.
142: *
143: * @return <CODE>true</CODE> if the difference mode is used,
144: * <CODE>false</CODE> otherwise.
145: *
146: * @see #setDifferenceMode
147: */
148: public boolean getDifferenceMode();
149:
150: /**
151: * Sets the difference mode flag value.
152: *
153: * @param value The difference mode flag value.
154: *
155: * @see #getDifferenceMode
156: */
157: public void setDifferenceMode(boolean value);
158:
159: }
|