com.sun.enterprise.admin.monitor.registry
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

Method Summary
 StatsHolder addChild(String name, MonitoredObjectType type)
          Add a child node or leaf to this node.
 Collection getAllChildren()
          return an array of StatHolder objects each representing a child of this node.
 StatsHolder getChild(String name)
           
 String getDottedName()
          Gets the hierarchically denoted dotted name for this node.
 String getName()
          Returns name of this hierarchical node
 ObjectName getObjectName()
          Gets the ObjectName pertaining to the MBean for this node.
 Stats getStats()
           
 Class getStatsClass()
           
 String getStatsClassName()
           
 MonitoredObjectType getType()
          Returns type of this hierarchical node
 void registerMBean()
          Registers a monitoring MBean with the MBeanServer
 void removeAllChildren()
          removes all children belonging to this node.
 void removeChild(String name)
           
 void setDottedName(String dottedName)
          Sets the hierarchically denoted dotted name for this node.
 void setObjectName(ObjectName name)
          Sets the ObjectName pertaining to the MBean for this node.
 void setStats(Stats stats)
          sets this hierarchical node's associated stats object.
 void setStatsClass(Class c)
           
 void setStatsClassName(String cName)
           
 void setType(MonitoredObjectType type)
           
 void unregisterMBean()
          Unregisters a monitoring MBean from the MBean Server
 

Method Detail

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

MonitoredObjectType 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)


Copyright © 2012. All Rights Reserved.