|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jmx.support.JmxUtils
public class JmxUtils
Collection of generic utility methods to support Spring JMX. Includes a convenient method to locate an MBeanServer.
| Constructor Summary | |
|---|---|
JmxUtils()
|
|
| Method Summary | |
|---|---|
static String |
getAttributeName(PropertyDescriptor property,
boolean useStrictCasing)
Return the JMX attribute name to use for the given JavaBeans property. |
static String[] |
getMethodSignature(Method method)
Create a String[] representing the signature of a method. |
static boolean |
isMBean(Class beanClass)
Check whether the supplied Class is a valid MBean resource. |
static MBeanServer |
locateMBeanServer()
Attempt to find a locally running MBeanServer. |
static Class[] |
parameterInfoToTypes(MBeanParameterInfo[] paramInfo)
Convert an array of MBeanParameterInfo into an array of
Class instances corresponding to the parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JmxUtils()
| Method Detail |
|---|
public static MBeanServer locateMBeanServer()
throws MBeanServerNotFoundException
MBeanServer. Fails if no
MBeanServer can be found, or if more than one is found.
MBeanServer if found
MBeanServerNotFoundException - if no MBeanServer is found, or more than one is found
public static Class[] parameterInfoToTypes(MBeanParameterInfo[] paramInfo)
throws ClassNotFoundException
MBeanParameterInfo into an array of
Class instances corresponding to the parameters.
ClassNotFoundExceptionpublic static String[] getMethodSignature(Method method)
String[] representing the signature of a method.
Each element in the array is the fully qualified class name
of the corresponding argument in the methods signature.
public static String getAttributeName(PropertyDescriptor property,
boolean useStrictCasing)
When using strict casing, a JavaBean property with a getter method
such as getFoo() translates to an attribute called
Foo. With strict casing disabled, getFoo()
would translate to just foo.
property - the JavaBeans property descriptoruseStrictCasing - whether to use strict casing
public static boolean isMBean(Class beanClass)
Class is a valid MBean resource.
beanClass - the class of the bean to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||