Package org.jgroups.jmx
Class ResourceDMBean
java.lang.Object
org.jgroups.jmx.ResourceDMBean
- All Implemented Interfaces:
DynamicMBean
A DynamicMBean wrapping an annotated object instance and exposing attributes annotated with @ManagedAttribute and
operations annotated with @ManagedOperation.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MBeanAttributeInfo[]protected final HashMap<String, ResourceDMBean.AttributeEntry> protected final booleanprotected static final Predicate<AccessibleObject> protected final Logprotected final Objectprotected final MBeanOperationInfo[]protected final List<MBeanOperationInfo> protected static final Class<?>[] -
Constructor Summary
ConstructorsConstructorDescriptionResourceDMBean(Object instance) ResourceDMBean(Object instance, Predicate<AccessibleObject> filter) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidprotected voidexposeManagedAttribute(Method method, Object instance, String prefix) protected voidfindFields(Object instance, Predicate<AccessibleObject> filter, String prefix) protected static ResourceDMBean.AccessorfindGetter(Object target, String attr_name) Finds an accessor for an attribute.protected voidfindMethods(Object instance, Predicate<AccessibleObject> filter, String prefix) static ResourceDMBean.AccessorfindSetter(Object target, String attr_name) Finds an accessor for an attribute.protected voidProvides field-based getter and/or setters for all attributes in attrs if not presentvoidgetAttribute(String name) getAttributes(String[] names) protected static Class<?> getClassForName(String name) protected AttributegetNamedAttribute(String name) protected static TimeUnitprotected static AttributeTypestatic booleanisFractional(Class<?> cl) static booleanisGetMethod(Method method) static booleanisIsMethod(Method method) static booleanstatic booleanstatic booleanisSetMethod(Method method) protected static Stringstatic StringprettyPrint(Object val, AccessibleObject a) voidsetAttribute(Attribute attribute) setAttributes(AttributeList list) protected booleansetNamedAttribute(Attribute attribute) protected static StringtoLowerCase(String input) Returns a string with the first letter being lowercase
-
Field Details
-
primitives
-
OBJECT_METHODS
-
expose_all
protected final boolean expose_all -
log
-
obj
-
components
-
attrInfo
-
opInfo
-
atts
-
ops
-
FILTER
-
-
Constructor Details
-
ResourceDMBean
-
ResourceDMBean
-
-
Method Details
-
getMBeanInfo
- Specified by:
getMBeanInfoin interfaceDynamicMBean
-
forAllAttributes
-
getAttribute
- Specified by:
getAttributein interfaceDynamicMBean
-
setAttribute
- Specified by:
setAttributein interfaceDynamicMBean
-
getAttributes
- Specified by:
getAttributesin interfaceDynamicMBean
-
setAttributes
- Specified by:
setAttributesin interfaceDynamicMBean
-
invoke
public Object invoke(String name, Object[] args, String[] sig) throws MBeanException, ReflectionException - Specified by:
invokein interfaceDynamicMBean- Throws:
MBeanExceptionReflectionException
-
isSetMethod
-
isGetMethod
-
isIsMethod
-
dumpStats
-
dumpStats
-
prettyPrint
-
isNumeric
-
isFractional
-
isNumber
-
getType
-
getTimeUnit
-
getClassForName
- Throws:
ClassNotFoundException
-
findMethods
-
fixFields
Provides field-based getter and/or setters for all attributes in attrs if not present -
exposeManagedAttribute
-
prefix
-
findGetter
Finds an accessor for an attribute. Tries to find getAttrName(), isAttrName(), attrName() methods. If not found, tries to use reflection to get the value of attr_name. If still not found, creates a NullAccessor. -
findSetter
Finds an accessor for an attribute. Tries to find setAttrName(), attrName() methods. If not found, tries to use reflection to set the value of attr_name. If still not found, creates a NullAccessor. -
toLowerCase
Returns a string with the first letter being lowercase -
findFields
-
getNamedAttribute
-
setNamedAttribute
-