Package org.glassfish.admin.amx.base
Class MBeanTracker
- java.lang.Object
-
- org.glassfish.admin.amx.base.MBeanTracker
-
- All Implemented Interfaces:
EventListener
,MBeanRegistration
,NotificationListener
,MBeanTrackerMBean
@Taxonomy(stability=NOT_AN_INTERFACE) @AMXMBeanMetadata(singleton=true, globalSingleton=true, leaf=true) public final class MBeanTracker extends Object implements NotificationListener, MBeanRegistration, MBeanTrackerMBean
Tracks the entire MBean parent/child hierarchy so that individual MBeans need not do so. Can supply parents and children of any MBean, used by all AMX implementations.
-
-
Field Summary
-
Fields inherited from interface org.glassfish.admin.amx.base.MBeanTrackerMBean
MBEAN_TRACKER_OBJECT_NAME
-
-
Constructor Summary
Constructors Constructor Description MBeanTracker(String jmxDomain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ObjectName>
getChildrenOf(ObjectName parent)
Get all children of the specified MBean.boolean
getEmitMBeanStatus()
ObjectName
getParentOf(ObjectName child)
void
handleNotification(Notification notifIn, Object handback)
void
postDeregister()
void
postRegister(Boolean registrationSucceeded)
void
preDeregister()
ObjectName
preRegister(MBeanServer server, ObjectName nameIn)
void
setEmitMBeanStatus(boolean emit)
-
-
-
Constructor Detail
-
MBeanTracker
public MBeanTracker(String jmxDomain)
-
-
Method Detail
-
getEmitMBeanStatus
public boolean getEmitMBeanStatus()
- Specified by:
getEmitMBeanStatus
in interfaceMBeanTrackerMBean
-
setEmitMBeanStatus
public void setEmitMBeanStatus(boolean emit)
- Specified by:
setEmitMBeanStatus
in interfaceMBeanTrackerMBean
-
handleNotification
public void handleNotification(Notification notifIn, Object handback)
- Specified by:
handleNotification
in interfaceNotificationListener
-
preRegister
public ObjectName preRegister(MBeanServer server, ObjectName nameIn) throws Exception
- Specified by:
preRegister
in interfaceMBeanRegistration
- Throws:
Exception
-
postRegister
public final void postRegister(Boolean registrationSucceeded)
- Specified by:
postRegister
in interfaceMBeanRegistration
-
preDeregister
public final void preDeregister() throws Exception
- Specified by:
preDeregister
in interfaceMBeanRegistration
- Throws:
Exception
-
postDeregister
public final void postDeregister()
- Specified by:
postDeregister
in interfaceMBeanRegistration
-
getParentOf
public ObjectName getParentOf(ObjectName child)
- Specified by:
getParentOf
in interfaceMBeanTrackerMBean
-
getChildrenOf
public Set<ObjectName> getChildrenOf(ObjectName parent)
Description copied from interface:MBeanTrackerMBean
Get all children of the specified MBean. An empty set is returned if no children are found.- Specified by:
getChildrenOf
in interfaceMBeanTrackerMBean
-
-