Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management.monitor
Class StringMonitor

    java.lang.Object
      |
      +--javax.management.NotificationBroadcasterSupport
            |
            +--javax.management.monitor.Monitor
                  |
                  +--javax.management.monitor.StringMonitor

public class StringMonitor
extends Monitor
implements StringMonitorMBean

This class defines a monitor MBean designed to observe the values of a string attribute.

A string monitor sends notifications as follows:

- if the attribute value is matching the string to compare value, a match notification is sent. The notify match flag must be set to true.
  Subsequent matching of the string to compare value do not cause further notifications unless the attribute value differs from the string to compare value.
- if the attribute value is differing from the string to compare value, a differ notification is sent. The notify differ flag must be set to true.
  Subsequent differing from the string to compare value do not cause further notifications unless the attribute value matches the string to compare value.

See Also:
  Serialized Form

Fields inherited from class javax.management.monitor.Monitor
`alreadyNotified, dbgTag, OBSERVED_ATTRIBUTE_ERROR_NOTIFIED, OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED, OBSERVED_OBJECT_ERROR_NOTIFIED, RESET_FLAGS_ALREADY_NOTIFIED, RUNTIME_ERROR_NOTIFIED, server`

Constructor Summary
`StringMonitor()` Default constructor.

Method Summary
`java.lang.String` | `getDerivedGauge()` Gets the derived gauge.
`java.util.Date` | `getDerivedGaugeTimeStamp()` Gets the derived gauge timestamp.
`boolean` | `getNotifyDiffer()` Gets the differing notifications on/off switch value.
`boolean` | `getNotifyMatch()` Gets the matching notifications on/off switch value.
`java.lang.String` | `getStringToCompare()` Gets the string to compare with the observed attribute.
`void` | `setNotifyDiffer(boolean value)` Sets the differing notifications on/off switch value.
`void` | `setNotifyMatch(boolean value)` Sets the matching notifications on/off switch value.
`void` | `setStringToCompare(java.lang.String value)` Sets the string to compare with the observed attribute.
`void` | `start()` Starts the StringMonitor.
`void` | `stop()` Stops the StringMonitor.

Methods inherited from class javax.management.monitor.Monitor
`getGranularityPeriod, getObservedAttribute, getObservedObject, isActive, postDeregister, postRegister, preDeregister, preRegister, setGranularityPeriod, setObservedAttribute, setObservedObject`

Methods inherited from class javax.management.NotificationBroadcasterSupport
`addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringMonitor

    public StringMonitor()

  Default constructor.

Method Detail

### start

    public void start()

  Starts the StringMonitor.
  Overrides:
    start in class Monitor

### stop

    public void stop()

  Stops the StringMonitor.
  Overrides:
    stop in class Monitor

### getDerivedGauge

    public java.lang.String getDerivedGauge()

  Gets the derived gauge.
  Specified by:
    getDerivedGauge in interface StringMonitorMBean
  Returns:
    The derived gauge.

### getDerivedGaugeTimeStamp

    public java.util.Date getDerivedGaugeTimeStamp()

  Gets the derived gauge timestamp.
  Specified by:
    getDerivedGaugeTimeStamp in interface StringMonitorMBean
  Returns:
    The derived gauge timestamp.

### getStringToCompare

    public java.lang.String getStringToCompare()

  Gets the string to compare with the observed attribute.
  Specified by:
    getStringToCompare in interface StringMonitorMBean
  Returns:
    The string value.

### setStringToCompare

    public void setStringToCompare(java.lang.String value)
                            throws java.lang.IllegalArgumentException

  Sets the string to compare with the observed attribute.
  Specified by:
    setStringToCompare in interface StringMonitorMBean
  Parameters:
    `value` - The string value.
  Throws:
    java.lang.IllegalArgumentException - The specified string to compare is null.

### getNotifyMatch

    public boolean getNotifyMatch()

  Gets the matching notifications on/off switch value.
  Specified by:
    getNotifyMatch in interface StringMonitorMBean
  Returns:
    True if the StringMonitor notifies when matching the string to compare, false otherwise.

### setNotifyMatch

    public void setNotifyMatch(boolean value)

  Sets the matching notifications on/off switch value.
  Specified by:
    setNotifyMatch in interface StringMonitorMBean
  Parameters:
    `value` - The matching notifications on/off switch value.

### getNotifyDiffer

    public boolean getNotifyDiffer()

  Gets the differing notifications on/off switch value.
  Specified by:
    getNotifyDiffer in interface StringMonitorMBean
  Returns:
    True if the StringMonitor notifies when differing from the string to compare, false otherwise.

### setNotifyDiffer

    public void setNotifyDiffer(boolean value)

  Sets the differing notifications on/off switch value.
  Specified by:
    setNotifyDiffer in interface StringMonitorMBean
  Parameters:
    `value` - The differing notifications on/off switch value.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD