public final class MBeanUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JMX_HOST_PREFIX |
static String |
JMX_OBJECT_NAME |
static String |
JMX_SVCSTATUS_OPERATION_DETAILED |
static String |
JMX_TARGET_PREFIX |
static String |
JMX_URL_SEPARATOR |
static String |
JMX_URL_SUFFIX |
static int |
RMI_REGISTRY_PORT |
Modifier and Type | Method and Description |
---|---|
static String |
constructJmxUrl(String targetHost,
int rmiRegistryPort) |
static JMXServiceURL |
getJMXUrl(String targetHost) |
static <T> T |
getMBean(String jmxName,
Class<T> klass) |
static Object |
getMBeanAttribute(String objName,
String attribute) |
static Object |
invokeMBeanFunction(String objName,
String functionName) |
static String |
invokeRemoteJMXOperation(String host,
String mbeanName) |
static Object |
readMBeanAttribute(String objName,
String attribute)
Deprecated.
Use
getMBeanAttribute(String, String) instead. |
static MBeanServer |
registerServerMBean(Object mxBeanImplementor,
String objNameStr) |
static org.apache.commons.lang3.tuple.Pair<JMXConnectorServer,Registry> |
startRMIConnectorServer(MBeanServer mbeanServer,
String selfAddress) |
static void |
stopRMIConnectorServer(org.apache.commons.lang3.tuple.Pair<JMXConnectorServer,Registry> jmxConnector) |
static void |
unregisterServerMBean(Object mxBeanImplementor,
String objNameStr) |
public static final String JMX_OBJECT_NAME
public static final String JMX_SVCSTATUS_OPERATION_DETAILED
public static final String JMX_HOST_PREFIX
public static final String JMX_TARGET_PREFIX
public static final String JMX_URL_SUFFIX
public static final String JMX_URL_SEPARATOR
public static final int RMI_REGISTRY_PORT
public static JMXServiceURL getJMXUrl(String targetHost) throws MalformedURLException
MalformedURLException
public static org.apache.commons.lang3.tuple.Pair<JMXConnectorServer,Registry> startRMIConnectorServer(MBeanServer mbeanServer, String selfAddress) throws IOException
IOException
public static void stopRMIConnectorServer(org.apache.commons.lang3.tuple.Pair<JMXConnectorServer,Registry> jmxConnector) throws IOException
IOException
public static MBeanServer registerServerMBean(Object mxBeanImplementor, String objNameStr) throws JMException
JMException
public static void unregisterServerMBean(Object mxBeanImplementor, String objNameStr) throws MalformedObjectNameException, InstanceNotFoundException, MBeanRegistrationException
@Nullable public static Object getMBeanAttribute(String objName, String attribute) throws JMException
JMException
@Nullable @Deprecated public static Object readMBeanAttribute(String objName, String attribute)
getMBeanAttribute(String, String)
instead.public static <T> T getMBean(String jmxName, Class<T> klass) throws MalformedObjectNameException
MalformedObjectNameException
Copyright © 2019 OpenDaylight. All rights reserved.