1. /*
  2. * @(#)GaugeMonitorMBean.java 4.25 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 gauge monitor MBean.
  13. *
  14. * @version 4.25 05/18/04
  15. * @author Sun Microsystems, Inc
  16. *
  17. * @since 1.5
  18. */
  19. public interface GaugeMonitorMBean 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 derived gauge for the specified MBean.
  40. *
  41. * @param object the MBean for which the derived gauge is to be returned
  42. * @return The derived gauge for the specified MBean if this MBean is in the
  43. * set of observed MBeans, or <code>null</code> otherwise.
  44. *
  45. * @since.unbundled JMX 1.2
  46. */
  47. public Number getDerivedGauge(ObjectName object);
  48. /**
  49. * Gets the derived gauge timestamp for the specified MBean.
  50. *
  51. * @param object the MBean for which the derived gauge timestamp is to be returned
  52. * @return The derived gauge timestamp for the specified MBean if this MBean
  53. * is in the set of observed MBeans, or <code>null</code> otherwise.
  54. *
  55. * @since.unbundled JMX 1.2
  56. */
  57. public long getDerivedGaugeTimeStamp(ObjectName object);
  58. /**
  59. * Gets the high threshold value.
  60. *
  61. * @return The high threshold value.
  62. */
  63. public Number getHighThreshold();
  64. /**
  65. * Gets the low threshold value.
  66. *
  67. * @return The low threshold value.
  68. */
  69. public Number getLowThreshold();
  70. /**
  71. * Sets the high and the low threshold values.
  72. *
  73. * @param highValue The high threshold value.
  74. * @param lowValue The low threshold value.
  75. * @exception java.lang.IllegalArgumentException The specified high/low threshold is null
  76. * or the low threshold is greater than the high threshold
  77. * or the high threshold and the low threshold are not of the same type.
  78. */
  79. public void setThresholds(Number highValue, Number lowValue) throws java.lang.IllegalArgumentException;
  80. /**
  81. * Gets the high notification's on/off switch value.
  82. *
  83. * @return <CODE>true</CODE> if the gauge monitor notifies when
  84. * exceeding the high threshold, <CODE>false</CODE> otherwise.
  85. *
  86. * @see #setNotifyHigh
  87. */
  88. public boolean getNotifyHigh();
  89. /**
  90. * Sets the high notification's on/off switch value.
  91. *
  92. * @param value The high notification's on/off switch value.
  93. *
  94. * @see #getNotifyHigh
  95. */
  96. public void setNotifyHigh(boolean value);
  97. /**
  98. * Gets the low notification's on/off switch value.
  99. *
  100. * @return <CODE>true</CODE> if the gauge monitor notifies when
  101. * exceeding the low threshold, <CODE>false</CODE> otherwise.
  102. *
  103. * @see #setNotifyLow
  104. */
  105. public boolean getNotifyLow();
  106. /**
  107. * Sets the low notification's on/off switch value.
  108. *
  109. * @param value The low notification's on/off switch value.
  110. *
  111. * @see #getNotifyLow
  112. */
  113. public void setNotifyLow(boolean value);
  114. /**
  115. * Gets the difference mode flag value.
  116. *
  117. * @return <CODE>true</CODE> if the difference mode is used,
  118. * <CODE>false</CODE> otherwise.
  119. *
  120. * @see #setDifferenceMode
  121. */
  122. public boolean getDifferenceMode();
  123. /**
  124. * Sets the difference mode flag value.
  125. *
  126. * @param value The difference mode flag value.
  127. *
  128. * @see #getDifferenceMode
  129. */
  130. public void setDifferenceMode(boolean value);
  131. }