Interface StatsHolder


public interface StatsHolder
Provides the ability to associate various j2ee components and sub components in a hierarchical tree. Holds references to underlying Stats objects. On instantiation, the Stats object is converted to a DynamicMBean instance. When monitoring level is changed from OFF to LOW or HIGH, the MBean is registered with an MBeanServer. Calls made to the MBean are delegated to this object which in turn delegates it to underlying Stats object.
Author:
Shreedhar Ganapathy <mailto:shreedhar.ganapathy@sun.com>
  • Method Details

    • addChild

      StatsHolder addChild(String name, MonitoredObjectType type)
      Add a child node or leaf to this node.
      Parameters:
      statsHolder -
    • getAllChildren

      Collection getAllChildren()
      return an array of StatHolder objects each representing a child of this node.
      Returns:
      Collection
    • removeAllChildren

      void removeAllChildren()
      removes all children belonging to this node.
    • getName

      String getName()
      Returns name of this hierarchical node
    • getType

      Returns type of this hierarchical node
    • setStats

      void setStats(Stats stats)
      sets this hierarchical node's associated stats object. Used when node was originally created without a Stats implementation or a new monitoring level has been set requiring a new Stats registration
    • getStats

      Stats getStats()
    • setStatsClass

      void setStatsClass(Class c)
    • getStatsClass

      Class getStatsClass()
    • setStatsClassName

      void setStatsClassName(String cName)
    • getStatsClassName

      String getStatsClassName()
    • setObjectName

      void setObjectName(ObjectName name)
      Sets the ObjectName pertaining to the MBean for this node.
    • getObjectName

      ObjectName getObjectName()
      Gets the ObjectName pertaining to the MBean for this node.
    • setDottedName

      void setDottedName(String dottedName)
      Sets the hierarchically denoted dotted name for this node.
    • getDottedName

      String getDottedName()
      Gets the hierarchically denoted dotted name for this node.
    • registerMBean

      void registerMBean()
      Registers a monitoring MBean with the MBeanServer
    • unregisterMBean

      void unregisterMBean()
      Unregisters a monitoring MBean from the MBean Server
    • setType

      void setType(MonitoredObjectType type)
    • getChild

      StatsHolder getChild(String name)
    • removeChild

      void removeChild(String name)