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 counter 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 CounterMonitorMBean 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 threshold.
057: *
058: * @return the threshold.
059: * @deprecated use {@link #getThreshold(ObjectName)}
060: */
061: public Number getThreshold();
062:
063: /**
064: * Sets the threshold.
065: *
066: * @param value the threshold value, pass zero for no threshold.
067: * @throws IllegalArgumentException when the threshold is null or
068: * less than zero.
069: * @deprecated use {@link #setInitThreshold(Number)}
070: */
071: public void setThreshold(Number value)
072: throws IllegalArgumentException;
073:
074: /**
075: * Retrieves the derived gauge.
076: *
077: * @param name the object name of the mbean.
078: * @return the derived gauge.
079: */
080: public Number getDerivedGauge(ObjectName name);
081:
082: /**
083: * Retrieves the derived gauge timestamp.
084: *
085: * @param name the object name of the mbean.
086: * @return the derived gauge timestamp.
087: */
088: public long getDerivedGaugeTimeStamp(ObjectName name);
089:
090: /**
091: * Retrieves the threshold.
092: *
093: * @param name the object name of the mbean.
094: * @return the threshold.
095: */
096: public Number getThreshold(ObjectName name);
097:
098: /**
099: * Retrieves the initial threshold.
100: *
101: * @return the initial threshold.
102: */
103: public Number getInitThreshold();
104:
105: /**
106: * Sets the initial threshold.
107: *
108: * @param value the initial threshold.
109: */
110: public void setInitThreshold(Number value)
111: throws IllegalArgumentException;
112:
113: /**
114: * Retrieves the offset.
115: *
116: * @return the offset value, zero means no offset.
117: */
118: public Number getOffset();
119:
120: /**
121: * Sets the offset.
122: *
123: * @param value the offset value, pass zero for no offset.
124: * @throws IllegalArgumentException when the offset is null or
125: * less than zero.
126: */
127: public void setOffset(Number value) throws IllegalArgumentException;
128:
129: /**
130: * Retrieves the modulus.
131: *
132: * @return the modulus value, zero means no modulus.
133: */
134: public Number getModulus();
135:
136: /**
137: * Sets the modulus.
138: *
139: * @param value the modulus value, pass zero for no modulus.
140: * @throws IllegalArgumentException when the modulus is null or
141: * less than zero.
142: */
143: public void setModulus(Number value)
144: throws IllegalArgumentException;
145:
146: /**
147: * Retrieves the notify on/off switch.
148: *
149: * @return true if notifications occur, false otherwise.
150: */
151: public boolean getNotify();
152:
153: /**
154: * Sets the notify on/off switch.
155: *
156: * @param value pass true notifications, false otherwise.
157: */
158: public void setNotify(boolean value);
159:
160: /**
161: * Retrieves the difference mode flag.
162: *
163: * @return true when in difference mode, false otherwise.
164: */
165: public boolean getDifferenceMode();
166:
167: /**
168: * Sets the difference mode flag.
169: *
170: * @param value pass true for difference mode, false otherwise.
171: */
172: public void setDifferenceMode(boolean value);
173:
174: }
|