public class JmxUtil extends Object
| Constructor and Description |
|---|
JmxUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildJmxDomain(GlobalConfiguration cfg,
MBeanServer mBeanServer,
String groupName)
Build the JMX domain name.
|
static MBeanServer |
lookupMBeanServer(GlobalConfiguration cfg)
Looks up the
MBeanServer instance based on the
configuration parameters. |
static void |
registerMBean(ResourceDMBean dynamicMBean,
ObjectName objectName,
MBeanServer mBeanServer)
Register the given dynamic JMX MBean.
|
static void |
unregisterMBean(ObjectName objectName,
MBeanServer mBeanServer)
Unregister the MBean located under the given
ObjectName |
public static MBeanServer lookupMBeanServer(GlobalConfiguration cfg)
MBeanServer instance based on the
configuration parameters.cfg - configuration instance indicating how to lookup
the MBeanServerMBeanServerpublic static String buildJmxDomain(GlobalConfiguration cfg, MBeanServer mBeanServer, String groupName)
cfg - configuration instance containig rules on JMX domains allowedmBeanServer - the MBeanServer where to
check whether the JMX domain is allowed or not.groupName - String containing the group name for the JMX MBeanpublic static void registerMBean(ResourceDMBean dynamicMBean, ObjectName objectName, MBeanServer mBeanServer) throws Exception
dynamicMBean - Dynamic MBean to registerobjectName - ObjectName under which to register the MBean.mBeanServer - MBeanServer where to store the MBean.Exception - If registration could not be completed.public static void unregisterMBean(ObjectName objectName, MBeanServer mBeanServer) throws Exception
ObjectNameobjectName - ObjectName where the MBean is registeredmBeanServer - MBeanServer from which to unregister the MBean.Exception - If unregistration could not be completed.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.