Interface StatsHolder
-
public interface StatsHolderProvides 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatsHolderaddChild(String name, MonitoredObjectType type)Add a child node or leaf to this node.CollectiongetAllChildren()return an array of StatHolder objects each representing a child of this node.StatsHoldergetChild(String name)StringgetDottedName()Gets the hierarchically denoted dotted name for this node.StringgetName()Returns name of this hierarchical nodeObjectNamegetObjectName()Gets the ObjectName pertaining to the MBean for this node.StatsgetStats()ClassgetStatsClass()StringgetStatsClassName()MonitoredObjectTypegetType()Returns type of this hierarchical nodevoidregisterMBean()Registers a monitoring MBean with the MBeanServervoidremoveAllChildren()removes 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.voidsetStats(Stats stats)sets this hierarchical node's associated stats object.voidsetStatsClass(Class c)voidsetStatsClassName(String cName)voidsetType(MonitoredObjectType type)voidunregisterMBean()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)
-
-