|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.zookeeper.jmx.MBeanRegistry
public class MBeanRegistry
This class provides a unified interface for registering/unregistering of zookeeper MBeans with the platform MBean server. It builds a hierarchy of MBeans where each MBean represented by a filesystem-like path. Eventually, this hierarchy will be stored in the zookeeper data tree instance as a virtual data tree.
Constructor Summary | |
---|---|
MBeanRegistry()
|
Method Summary | |
---|---|
static MBeanRegistry |
getInstance()
|
java.lang.String |
makeFullPath(java.lang.String prefix,
java.lang.String... name)
Generate a filesystem-like path. |
protected java.lang.String |
makeFullPath(java.lang.String prefix,
ZKMBeanInfo bean)
|
protected javax.management.ObjectName |
makeObjectName(java.lang.String path,
ZKMBeanInfo bean)
Builds an MBean path and creates an ObjectName instance using the path. |
void |
register(ZKMBeanInfo bean,
ZKMBeanInfo parent)
Registers a new MBean with the platform MBean server. |
void |
unregister(ZKMBeanInfo bean)
Unregister MBean. |
void |
unregisterAll()
Unregister all currently registered MBeans |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MBeanRegistry()
Method Detail |
---|
public static MBeanRegistry getInstance()
public void register(ZKMBeanInfo bean, ZKMBeanInfo parent) throws javax.management.JMException
bean
- the bean being registeredparent
- if not null, the new bean will be registered as a child
node of this parent.
javax.management.JMException
public void unregister(ZKMBeanInfo bean)
bean
- public void unregisterAll()
public java.lang.String makeFullPath(java.lang.String prefix, java.lang.String... name)
prefix
- path prefixname
- path elements
protected java.lang.String makeFullPath(java.lang.String prefix, ZKMBeanInfo bean)
protected javax.management.ObjectName makeObjectName(java.lang.String path, ZKMBeanInfo bean) throws javax.management.MalformedObjectNameException
path
- MBean pathbean
- the MBean instance
javax.management.MalformedObjectNameException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |