|
|||||||||
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()
|
String |
makeFullPath(String prefix,
String... name)
Generate a filesystem-like path. |
protected String |
makeFullPath(String prefix,
ZKMBeanInfo bean)
|
protected ObjectName |
makeObjectName(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 JMException
bean
- the bean being registeredparent
- if not null, the new bean will be registered as a child
node of this parent.
JMException
public void unregister(ZKMBeanInfo bean)
bean
- public void unregisterAll()
public String makeFullPath(String prefix, String... name)
prefix
- path prefixname
- path elements
protected String makeFullPath(String prefix, ZKMBeanInfo bean)
protected ObjectName makeObjectName(String path, ZKMBeanInfo bean) throws MalformedObjectNameException
path
- MBean pathbean
- the MBean instance
MalformedObjectNameException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |