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

## javax.management.monitor
Interface MonitorMBean

All Known Subinterfaces:
  CounterMonitorMBean, GaugeMonitorMBean, StringMonitorMBean

All Known Implementing Classes:
  CounterMonitor, GaugeMonitor, Monitor, StringMonitor

public interface MonitorMBean

The monitor service MBean interface.

Version:
  $Revision: 1.5 $
Author:
  Adrian Brock

Method Summary
`void` | `addObservedObject(ObjectName object)` Add the object name of the MBean monitored.
`boolean` | `containsObservedObject(ObjectName object)` Checks whether the object name is monitored.
`long` | `getGranularityPeriod()` Retrieves the granularity period in milliseconds.
`String` | `getObservedAttribute()` Retrieves the name of the attribute monitored.
`ObjectName` | `getObservedObject()` Deprecated. use `getObservedObjects()`
`ObjectName[]` | `getObservedObjects()` Retrieves the object names of the MBeans monitored.
`boolean` | `isActive()` Tests whether this monitoring service is active.
`void` | `removeObservedObject(ObjectName object)` Remove the object name of the MBean monitored.
`void` | `setGranularityPeriod(long period)` Sets the granularity period in milliseconds.
`void` | `setObservedAttribute(String attribute)` Sets the name of the attribute monitored.
`void` | `setObservedObject(ObjectName object)` Deprecated. use `addObservedObject(ObjectName)`
`void` | `start()` Starts the monitor.
`void` | `stop()` Stops the monitor.

Method Detail

### start

    public void start()

  Starts the monitor.

### stop

    public void stop()

  Stops the monitor.

### addObservedObject

    public void addObservedObject(ObjectName object)
                           throws IllegalArgumentException

  Add the object name of the MBean monitored.

  Parameters:
    `object` - the object name.
  Throws:
    `IllegalArgumentException`

### removeObservedObject

    public void removeObservedObject(ObjectName object)

  Remove the object name of the MBean monitored.

  Parameters:
    `object` - the object name.

### containsObservedObject

    public boolean containsObservedObject(ObjectName object)

  Checks whether the object name is monitored.

  Parameters:
    `object` - the object name.
  Returns:
    true when it is monitored.

### getObservedObjects

    public ObjectName[] getObservedObjects()

  Retrieves the object names of the MBeans monitored.

  Returns:
    the object names.

### getObservedObject

    public ObjectName getObservedObject()

  Deprecated. use `getObservedObjects()`

  Retrieves the object name of the MBean monitored.

  Returns:
    the object name.

### setObservedObject

    public void setObservedObject(ObjectName object)

  Deprecated. use `addObservedObject(ObjectName)`

  Sets the object name of the MBean monitored.

  The default value is null.

  Parameters:
    `object` - the object name.

### getObservedAttribute

    public String getObservedAttribute()

  Retrieves the name of the attribute monitored.

  Returns:
    the attribute monitored.

### setObservedAttribute

    public void setObservedAttribute(String attribute)

  Sets the name of the attribute monitored.

  The default value is null.

  Parameters:
    `attribute` - the attribute monitored.
  Throws:
    `IllegalArgumentException` - when the period is not positive.

### getGranularityPeriod

    public long getGranularityPeriod()

  Retrieves the granularity period in milliseconds.

  The monitoring takes place once per granularity period.

  Returns:
    the granularity period.

### setGranularityPeriod

    public void setGranularityPeriod(long period)
                              throws IllegalArgumentException

  Sets the granularity period in milliseconds.

  The monitoring takes place once per granularity period.

  The default value is 10 seconds.

  Parameters:
    `period` - the granularity period.
  Throws:
    `IllegalArgumentException` - when the period is not positive.

### isActive

    public boolean isActive()

  Tests whether this monitoring service is active.

  Returns:
    true when the service is active, false otherwise.

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.