## mx4j.tools.stats
Class ObserverStatisticsRecorder

    java.lang.Object
      mx4j.tools.stats.AbstractStatisticsRecorder
          mx4j.tools.stats.ObserverStatisticsRecorder

All Implemented Interfaces:
  javax.management.MBeanRegistration, ObserverStatisticsRecorderMBean, StatisticsRecorderMBean

Direct Known Subclasses:
  NotificationStatisticsRecorder, TimedStatisticsRecorder

public abstract class ObserverStatisticsRecorder
extends AbstractStatisticsRecorder
implements ObserverStatisticsRecorderMBean

Version:
  $Revision: 1.4 $

Field Summary
`protected java.lang.String` `observedAttribute`
`protected javax.management.ObjectName` `observedName`

Fields inherited from class mx4j.tools.stats.AbstractStatisticsRecorder
`averageValue, count, entries, isActive, isDouble, maxEntries, maximumValue, minimumValue, recordingStart, server`

Constructor Summary
`ObserverStatisticsRecorder()`

Method Summary
`protected void` `doStart()` Subclasses may override this to offer a custom startup procedure
`protected void` `doStop()` Subclasses may override this to offer a custom stop procedure
`java.lang.String` `getObservedAttribute()` Returns the observed Attribute
`javax.management.ObjectName` `getObservedObject()` Returns the observed ObjectName
`void` `setObservedAttribute(java.lang.String attribute)` Sets the Attribute to be observed
`void` `setObservedObject(javax.management.ObjectName object)` Sets the ObjectName to be observed
`protected abstract void` `startObserving()`
`protected abstract void` `stopObserving()`

Methods inherited from class mx4j.tools.stats.AbstractStatisticsRecorder
`addEntry, getAverage, getEntries, getLogger, getMax, getMaxEntries, getMin, getRecordingStart, isActive, postDeregister, postRegister, preDeregister, preRegister, setMaxEntries, start, stop`

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

Methods inherited from interface mx4j.tools.stats.StatisticsRecorderMBean
`getAverage, getEntries, getMax, getMaxEntries, getMin, getRecordingStart, isActive, setMaxEntries, start, stop`

Field Detail

### observedName

    protected javax.management.ObjectName observedName

### observedAttribute

    protected java.lang.String observedAttribute

Constructor Detail

### ObserverStatisticsRecorder

    public ObserverStatisticsRecorder()

Method Detail

### setObservedObject

    public void setObservedObject(javax.management.ObjectName object)

  Description copied from interface: `ObserverStatisticsRecorderMBean`
  Sets the ObjectName to be observed

  Specified by:
    `setObservedObject` in interface `ObserverStatisticsRecorderMBean`

### getObservedObject

    public javax.management.ObjectName getObservedObject()

  Description copied from interface: `ObserverStatisticsRecorderMBean`
  Returns the observed ObjectName

  Specified by:
    `getObservedObject` in interface `ObserverStatisticsRecorderMBean`

### getObservedAttribute

    public java.lang.String getObservedAttribute()

  Description copied from interface: `ObserverStatisticsRecorderMBean`
  Returns the observed Attribute

  Specified by:
    `getObservedAttribute` in interface `ObserverStatisticsRecorderMBean`

### setObservedAttribute

    public void setObservedAttribute(java.lang.String attribute)

  Description copied from interface: `ObserverStatisticsRecorderMBean`
  Sets the Attribute to be observed

  Specified by:
    `setObservedAttribute` in interface `ObserverStatisticsRecorderMBean`

### doStart

    protected void doStart()
                    throws java.lang.Exception

  Description copied from class: `AbstractStatisticsRecorder`
  Subclasses may override this to offer a custom startup procedure

  Overrides:
    `doStart` in class `AbstractStatisticsRecorder`
  Throws:
    `java.lang.Exception`

### startObserving

    protected abstract void startObserving()
                                    throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### stopObserving

    protected abstract void stopObserving()
                                   throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### doStop

    protected void doStop()
                   throws java.lang.Exception

  Description copied from class: `AbstractStatisticsRecorder`
  Subclasses may override this to offer a custom stop procedure

  Overrides:
    `doStop` in class `AbstractStatisticsRecorder`
  Throws:
    `java.lang.Exception`

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.