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 gauge monitor MBean.
014: *
015: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
016: */
017:
018: public interface GaugeMonitorMBean 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 high threshold value.
044: *
045: * @return The high threshold value.
046: */
047: public Number getHighThreshold();
048:
049: /**
050: * Gets the low threshold value.
051: *
052: * @return The low threshold value.
053: */
054: public Number getLowThreshold();
055:
056: /**
057: * Sets the high and the low threshold values.
058: *
059: * @param highValue The high threshold value.
060: * @param lowValue The low threshold value.
061: * @exception java.lang.IllegalArgumentException The specified high/low threshold is null
062: * or the low threshold is greater than the high threshold
063: * or the high threshold and the low threshold are not of the same type.
064: */
065: public void setThresholds(Number highValue, Number lowValue)
066: throws java.lang.IllegalArgumentException;
067:
068: /**
069: * Gets the high notification's on/off switch value.
070: *
071: * @return <CODE>true</CODE> if the gauge monitor notifies when
072: * exceeding the high threshold, <CODE>false</CODE> otherwise.
073: *
074: * @see #setNotifyHigh
075: */
076: public boolean getNotifyHigh();
077:
078: /**
079: * Sets the high notification's on/off switch value.
080: *
081: * @param value The high notification's on/off switch value.
082: *
083: * @see #getNotifyHigh
084: */
085: public void setNotifyHigh(boolean value);
086:
087: /**
088: * Gets the low notification's on/off switch value.
089: *
090: * @return <CODE>true</CODE> if the gauge monitor notifies when
091: * exceeding the low threshold, <CODE>false</CODE> otherwise.
092: *
093: * @see #setNotifyLow
094: */
095: public boolean getNotifyLow();
096:
097: /**
098: * Sets the low notification's on/off switch value.
099: *
100: * @param value The low notification's on/off switch value.
101: *
102: * @see #getNotifyLow
103: */
104: public void setNotifyLow(boolean value);
105:
106: /**
107: * Gets the difference mode flag value.
108: *
109: * @return <CODE>true</CODE> if the difference mode is used,
110: * <CODE>false</CODE> otherwise.
111: *
112: * @see #setDifferenceMode
113: */
114: public boolean getDifferenceMode();
115:
116: /**
117: * Sets the difference mode flag value.
118: *
119: * @param value The difference mode flag value.
120: *
121: * @see #getDifferenceMode
122: */
123: public void setDifferenceMode(boolean value);
124: }
|