1. /*
  2. * @(#)CounterMonitorMBean.java 4.26 04/05/18
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management.monitor;
  8. // jmx imports
  9. //
  10. import javax.management.ObjectName;
  11. /**
  12. * Exposes the remote management interface of the counter monitor MBean.
  13. *
  14. * @version 4.26 05/18/04
  15. * @author Sun Microsystems, Inc
  16. *
  17. * @since 1.5
  18. */
  19. public interface CounterMonitorMBean extends MonitorMBean {
  20. // GETTERS AND SETTERS
  21. //--------------------
  22. /**
  23. * Gets the derived gauge.
  24. *
  25. * @return The derived gauge.
  26. * @deprecated As of JMX 1.2, replaced by {@link #getDerivedGauge(ObjectName)}
  27. */
  28. @Deprecated
  29. public Number getDerivedGauge();
  30. /**
  31. * Gets the derived gauge timestamp.
  32. *
  33. * @return The derived gauge timestamp.
  34. * @deprecated As of JMX 1.2, replaced by {@link #getDerivedGaugeTimeStamp(ObjectName)}
  35. */
  36. @Deprecated
  37. public long getDerivedGaugeTimeStamp();
  38. /**
  39. * Gets the threshold value.
  40. *
  41. * @return The threshold value.
  42. *
  43. * @see #setThreshold(Number)
  44. *
  45. * @deprecated As of JMX 1.2, replaced by {@link #getThreshold(ObjectName)}
  46. */
  47. @Deprecated
  48. public Number getThreshold();
  49. /**
  50. * Sets the threshold value.
  51. *
  52. * @see #getThreshold()
  53. *
  54. * @param value The threshold value.
  55. * @exception java.lang.IllegalArgumentException The specified threshold is null or the threshold value is less than zero.
  56. * @deprecated As of JMX 1.2, replaced by {@link #setInitThreshold}
  57. */
  58. @Deprecated
  59. public void setThreshold(Number value) throws java.lang.IllegalArgumentException;
  60. /**
  61. * Gets the derived gauge for the specified MBean.
  62. *
  63. * @param object the MBean for which the derived gauge is to be returned
  64. * @return The derived gauge for the specified MBean if this MBean is in the
  65. * set of observed MBeans, or <code>null</code> otherwise.
  66. *
  67. * @since.unbundled JMX 1.2
  68. */
  69. public Number getDerivedGauge(ObjectName object);
  70. /**
  71. * Gets the derived gauge timestamp for the specified MBean.
  72. *
  73. * @param object the MBean for which the derived gauge timestamp is to be returned
  74. * @return The derived gauge timestamp for the specified MBean if this MBean
  75. * is in the set of observed MBeans, or <code>null</code> otherwise.
  76. *
  77. * @since.unbundled JMX 1.2
  78. */
  79. public long getDerivedGaugeTimeStamp(ObjectName object);
  80. /**
  81. * Gets the threshold value for the specified MBean.
  82. *
  83. * @param object the MBean for which the threshold value is to be returned
  84. * @return The threshold value for the specified MBean if this MBean
  85. * is in the set of observed MBeans, or <code>null</code> otherwise.
  86. *
  87. * @see #setThreshold
  88. *
  89. * @since.unbundled JMX 1.2
  90. */
  91. public Number getThreshold(ObjectName object);
  92. /**
  93. * Gets the initial threshold value common to all observed objects.
  94. *
  95. * @return The initial threshold value.
  96. *
  97. * @see #setInitThreshold
  98. *
  99. * @since.unbundled JMX 1.2
  100. */
  101. public Number getInitThreshold();
  102. /**
  103. * Sets the initial threshold value common to all observed MBeans.
  104. *
  105. * @param value The initial threshold value.
  106. * @exception java.lang.IllegalArgumentException The specified
  107. * threshold is null or the threshold value is less than zero.
  108. *
  109. * @see #getInitThreshold
  110. *
  111. * @since.unbundled JMX 1.2
  112. */
  113. public void setInitThreshold(Number value) throws java.lang.IllegalArgumentException;
  114. /**
  115. * Gets the offset value.
  116. *
  117. * @see #setOffset(Number)
  118. *
  119. * @return The offset value.
  120. */
  121. public Number getOffset();
  122. /**
  123. * Sets the offset value.
  124. *
  125. * @param value The offset value.
  126. * @exception java.lang.IllegalArgumentException The specified
  127. * offset is null or the offset value is less than zero.
  128. *
  129. * @see #getOffset()
  130. */
  131. public void setOffset(Number value) throws java.lang.IllegalArgumentException;
  132. /**
  133. * Gets the modulus value.
  134. *
  135. * @return The modulus value.
  136. *
  137. * @see #setModulus
  138. */
  139. public Number getModulus();
  140. /**
  141. * Sets the modulus value.
  142. *
  143. * @param value The modulus value.
  144. * @exception java.lang.IllegalArgumentException The specified
  145. * modulus is null or the modulus value is less than zero.
  146. *
  147. * @see #getModulus
  148. */
  149. public void setModulus(Number value) throws java.lang.IllegalArgumentException;
  150. /**
  151. * Gets the notification's on/off switch value.
  152. *
  153. * @return <CODE>true</CODE> if the counter monitor notifies when
  154. * exceeding the threshold, <CODE>false</CODE> otherwise.
  155. *
  156. * @see #setNotify
  157. */
  158. public boolean getNotify();
  159. /**
  160. * Sets the notification's on/off switch value.
  161. *
  162. * @param value The notification's on/off switch value.
  163. *
  164. * @see #getNotify
  165. */
  166. public void setNotify(boolean value);
  167. /**
  168. * Gets the difference mode flag value.
  169. *
  170. * @return <CODE>true</CODE> if the difference mode is used,
  171. * <CODE>false</CODE> otherwise.
  172. *
  173. * @see #setDifferenceMode
  174. */
  175. public boolean getDifferenceMode();
  176. /**
  177. * Sets the difference mode flag value.
  178. *
  179. * @param value The difference mode flag value.
  180. *
  181. * @see #getDifferenceMode
  182. */
  183. public void setDifferenceMode(boolean value);
  184. }