| java.lang.Object org.continuent.sequoia.controller.jmx.MBeanServerManager
MBeanServerManager | public class MBeanServerManager (Code) | | 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.continuent.sequoia.controller.jmx.MBeanServerBuilder
author: Marc Wick version: 1.0 |
Method Summary | |
public static synchronized MBeanServer | getInstance() | public static boolean | isJmxEnabled() Returns the isJmxEnabled value. | public static ObjectInstance | registerMBean(Object object, ObjectName name) Registers an MBean with the MBean server if jmx is enabled, otherwise it
returns null.
This method is equivalend to
MBeanServer server = MBeanServerManager.getInstance();
if (server != null)
{
server.registerMBean(object, name);
}
Parameters: object - The MBean to be registered as an MBean. Parameters: name - The object name of the MBean. | public static void | setJmxEnabled(boolean isJmxEnabled) | public static void | unregister(ObjectName name) unregister an mbean. |
getInstance | public static synchronized MBeanServer getInstance()(Code) | | creating a MBeanServer, if it does not exist, otherwise a reference to the
MBeanServer is returned
the mbeanserver instance, null if jmx is disabled |
isJmxEnabled | public static boolean isJmxEnabled()(Code) | | Returns the isJmxEnabled value.
Returns the isJmxEnabled. |
registerMBean | public static ObjectInstance registerMBean(Object object, ObjectName name) throws JmxException(Code) | | Registers an MBean with the MBean server if jmx is enabled, otherwise it
returns null.
This method is equivalend to
MBeanServer server = MBeanServerManager.getInstance();
if (server != null)
{
server.registerMBean(object, name);
}
Parameters: object - The MBean to be registered as an MBean. Parameters: name - The object name of the MBean. May be null. An ObjectInstance, containing the ObjectName and the Java classname of the newly registered MBean. If the contained ObjectName isn, the contained Java class name is getMBeanInfo(n).getClassName().Or null if jmx is disabled throws: JmxException - the object could not be registered |
setJmxEnabled | public static void setJmxEnabled(boolean isJmxEnabled) throws JmxException(Code) | | enable or disable jmx
Parameters: isJmxEnabled - The isJmxEnabled to set. throws: JmxException - an exception |
|
|