001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package javax.management.monitor;
023:
024: import javax.management.ObjectName;
025:
026: /**
027: * The gauge monitor service MBean interface. <p>
028: *
029: * @author <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>
030: * @version $Revision: 57200 $
031: */
032: public interface GaugeMonitorMBean extends MonitorMBean {
033: // Constants -----------------------------------------------------
034:
035: // Static --------------------------------------------------------
036:
037: // Public --------------------------------------------------------
038:
039: /**
040: * Retrieves the derived gauge.
041: *
042: * @return the derived gauge.
043: * @deprecated use {@link #getDerivedGauge(ObjectName)}
044: */
045: public Number getDerivedGauge();
046:
047: /**
048: * Retrieves the derived gauge timestamp.
049: *
050: * @return the derived gauge timestamp.
051: * @deprecated use {@link #getDerivedGaugeTimeStamp(ObjectName)}
052: */
053: public long getDerivedGaugeTimeStamp();
054:
055: /**
056: * Retrieves the derived gauge.
057: *
058: * @param name the object name of the mbean.
059: * @return the derived gauge.
060: */
061: public Number getDerivedGauge(ObjectName name);
062:
063: /**
064: * Retrieves the derived gauge timestamp.
065: *
066: * @param name the object name of the mbean.
067: * @return the derived gauge timestamp.
068: */
069: public long getDerivedGaugeTimeStamp(ObjectName name);
070:
071: /**
072: * Retrieves the high threshold.
073: * REVIEW: zero threshold
074: *
075: * @return the high threshold value, zero means no threshold.
076: */
077: public Number getHighThreshold();
078:
079: /**
080: * Retrieves the low threshold.
081: * REVIEW: zero threshold
082: *
083: * @return the low threshold value, zero means no threshold.
084: */
085: public Number getLowThreshold();
086:
087: /**
088: * Sets the high and low threshold.
089: * REVIEW: zero threshold
090: *
091: * @param highValue the high threshold value, pass zero for no high
092: * threshold.
093: * @param lowValue the low threshold value, pass zero for no low
094: * threshold.
095: * @throws IllegalArgumentException when either threshold is null or
096: * the high threshold is lower than the low threshold or the.
097: * thresholds have different types.
098: */
099: public void setThresholds(Number highValue, Number lowValue)
100: throws IllegalArgumentException;
101:
102: /**
103: * Retrieves the high notify on/off switch.
104: *
105: * @return true if high notifications occur, false otherwise.
106: */
107: public boolean getNotifyHigh();
108:
109: /**
110: * Sets the high notify on/off switch.
111: *
112: * @param value pass true for high notifications, false otherwise.
113: */
114: public void setNotifyHigh(boolean value);
115:
116: /**
117: * Retrieves the low notify on/off switch.
118: *
119: * @return true if low notifications occur, false otherwise.
120: */
121: public boolean getNotifyLow();
122:
123: /**
124: * Sets the low notify on/off switch.
125: *
126: * @param value pass true for low notifications, false otherwise.
127: */
128: public void setNotifyLow(boolean value);
129:
130: /**
131: * Retrieves the difference mode flag.
132: *
133: * @return true when in difference mode, false otherwise.
134: */
135: public boolean getDifferenceMode();
136:
137: /**
138: * Sets the difference mode flag.
139: */
140: public void setDifferenceMode(boolean value);
141: }
|