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 Summary
Modifier and TypeMethodDescriptionaddChild(String name, MonitoredObjectType type) Add a child node or leaf to this node.return an array of StatHolder objects each representing a child of this node.Gets the hierarchically denoted dotted name for this node.getName()Returns name of this hierarchical nodeGets the ObjectName pertaining to the MBean for this node.getStats()getType()Returns type of this hierarchical nodevoidRegisters a monitoring MBean with the MBeanServervoidremoves all children belonging to this node.voidremoveChild(String name) voidsetDottedName(String dottedName) Sets the hierarchically denoted dotted name for this node.voidsetObjectName(ObjectName name) Sets the ObjectName pertaining to the MBean for this node.voidsets this hierarchical node's associated stats object.voidvoidsetStatsClassName(String cName) voidsetType(MonitoredObjectType type) voidUnregisters a monitoring MBean from the MBean Server
-
Method Details
-
addChild
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
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
-
getStatsClass
Class getStatsClass() -
setStatsClassName
-
getStatsClassName
String getStatsClassName() -
setObjectName
Sets the ObjectName pertaining to the MBean for this node. -
getObjectName
ObjectName getObjectName()Gets the ObjectName pertaining to the MBean for this node. -
setDottedName
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
-
getChild
-
removeChild
-