public final class JmxTools extends Object
| Modifier and Type | Method and Description |
|---|---|
static Object |
getAttribute(MBeanServer mbeanServer,
ObjectName objName,
String attrName)
Gets the attribute.
|
static boolean |
getBooleanAttr(CompositeData cds,
String name)
Gets the boolean attr.
|
static int |
getIntAttr(CompositeData cds,
String name,
int defaultValue)
Gets the int attr.
|
static int |
getIntAttr(MBeanServer mbeanServer,
ObjectName objName,
String attrName)
Gets the int attr.
|
static long |
getLongAttr(CompositeData cds,
String name)
Gets the long attr.
|
static long |
getLongAttr(MBeanServer mbeanServer,
ObjectName objName,
String attrName)
Gets the long attr.
|
static long |
getLongAttr(MBeanServer mbeanServer,
ObjectName objName,
String attrName,
long defaultValue)
Gets the long attr.
|
static String |
getStringAttr(CompositeData cds,
String name)
Gets the string attr.
|
static String |
getStringAttr(MBeanServer mbeanServer,
ObjectName objName,
String attrName)
Gets the string attr.
|
static boolean |
hasAttribute(MBeanServer server,
ObjectName mbean,
String attrName)
Checks for attribute.
|
static Object |
invoke(MBeanServer mbeanServer,
ObjectName objName,
String method,
Object[] o,
String[] s)
Invoke.
|
public static Object getAttribute(MBeanServer mbeanServer, ObjectName objName, String attrName) throws Exception
mbeanServer - the mbean serverobjName - the obj nameattrName - the attr nameException - the exceptionpublic static Object invoke(MBeanServer mbeanServer, ObjectName objName, String method, Object[] o, String[] s) throws Exception
mbeanServer - the mbean serverobjName - the obj namemethod - the methodo - the os - the sException - the exceptionpublic static long getLongAttr(MBeanServer mbeanServer, ObjectName objName, String attrName, long defaultValue)
mbeanServer - the mbean serverobjName - the obj nameattrName - the attr namedefaultValue - the default valuepublic static long getLongAttr(CompositeData cds, String name)
cds - the cdsname - the namepublic static long getLongAttr(MBeanServer mbeanServer, ObjectName objName, String attrName) throws Exception
mbeanServer - the mbean serverobjName - the obj nameattrName - the attr nameException - the exceptionpublic static int getIntAttr(MBeanServer mbeanServer, ObjectName objName, String attrName) throws Exception
mbeanServer - the mbean serverobjName - the obj nameattrName - the attr nameException - the exceptionpublic static int getIntAttr(CompositeData cds, String name, int defaultValue)
cds - the cdsname - the namedefaultValue - the default valuepublic static String getStringAttr(MBeanServer mbeanServer, ObjectName objName, String attrName) throws Exception
mbeanServer - the mbean serverobjName - the obj nameattrName - the attr nameException - the exceptionpublic static String getStringAttr(CompositeData cds, String name)
cds - the cdsname - the namepublic static boolean getBooleanAttr(CompositeData cds, String name)
cds - the cdsname - the namepublic static boolean hasAttribute(MBeanServer server, ObjectName mbean, String attrName) throws Exception
server - the servermbean - the mbeanattrName - the attr nameException - the exceptionCopyright © 2009–2020 psi-probe. All rights reserved.