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 string monitor MBean.
014: *
015: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
016: */
017:
018: public interface StringMonitorMBean 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 String 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 string to compare with the observed attribute.
044: *
045: * @return The string value.
046: *
047: * @see #setStringToCompare
048: */
049: public String getStringToCompare();
050:
051: /**
052: * Sets the string to compare with the observed attribute.
053: *
054: * @param value The string value.
055: * @exception java.lang.IllegalArgumentException The specified
056: * string to compare is null.
057: *
058: * @see #getStringToCompare
059: */
060: public void setStringToCompare(String value)
061: throws java.lang.IllegalArgumentException;
062:
063: /**
064: * Gets the matching notification's on/off switch value.
065: *
066: * @return <CODE>true</CODE> if the string monitor notifies when
067: * matching, <CODE>false</CODE> otherwise.
068: *
069: * @see #setNotifyMatch
070: */
071: public boolean getNotifyMatch();
072:
073: /**
074: * Sets the matching notification's on/off switch value.
075: *
076: * @param value The matching notification's on/off switch value.
077: *
078: * @see #getNotifyMatch
079: */
080: public void setNotifyMatch(boolean value);
081:
082: /**
083: * Gets the differing notification's on/off switch value.
084: *
085: * @return <CODE>true</CODE> if the string monitor notifies when
086: * differing, <CODE>false</CODE> otherwise.
087: *
088: * @see #setNotifyDiffer
089: */
090: public boolean getNotifyDiffer();
091:
092: /**
093: * Sets the differing notification's on/off switch value.
094: *
095: * @param value The differing notification's on/off switch value.
096: *
097: * @see #getNotifyDiffer
098: */
099: public void setNotifyDiffer(boolean value);
100:
101: }
|