|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.controller.jmx.MBeanServerManager
The MBeanServerManager (Singleton) creates a single MBeanServer in an JVM. The server can be accessed with the getInstance() method.
The server is created with org.objectweb.cjdbc.controller.jmx.MBeanServerBuilder
Field Summary | |
private static boolean |
isJmxEnabled
|
(package private) static Trace |
logger
|
private static javax.management.MBeanServer |
mbs
|
Constructor Summary | |
MBeanServerManager()
|
Method Summary | |
static javax.management.MBeanServer |
getInstance()
creating a MBeanServer, if it does not exist, otherwise a reference to the MBeanServer is returned |
static boolean |
isJmxEnabled()
Returns the isJmxEnabled value. |
static javax.management.ObjectInstance |
registerMBean(java.lang.Object object,
javax.management.ObjectName name)
Registers an MBean with the MBean server if jmx is enabled, otherwise it returns null. |
static void |
setJmxEnabled(boolean isJmxEnabled)
enable or disable jmx |
static void |
unregister(javax.management.ObjectName name)
unregister an mbean. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Trace logger
private static javax.management.MBeanServer mbs
private static boolean isJmxEnabled
Constructor Detail |
public MBeanServerManager()
Method Detail |
public static javax.management.MBeanServer getInstance()
public static boolean isJmxEnabled()
public static void setJmxEnabled(boolean isJmxEnabled) throws JmxException
isJmxEnabled
- The isJmxEnabled to set.
JmxException
- an exceptionpublic static javax.management.ObjectInstance registerMBean(java.lang.Object object, javax.management.ObjectName name) throws JmxException
This method is equivalend to
MBeanServer server = MBeanServerManager.getInstance(); if (server != null) { server.registerMBean(object, name); }
object
- The MBean to be registered as an MBean.name
- The object name of the MBean. May be null.
JmxException
- the object could not be registeredpublic static void unregister(javax.management.ObjectName name) throws JmxException
name
- the name of the bean to unregister
JmxException
- problems
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |