public class ResourceDMBean
extends java.lang.Object
implements javax.management.DynamicMBean
ManagedAttribute
,
ManagedOperation
,
MBean
Modifier and Type | Class and Description |
---|---|
static interface |
ResourceDMBean.Accessor |
protected static class |
ResourceDMBean.AttributeEntry |
static class |
ResourceDMBean.FieldAccessor |
static class |
ResourceDMBean.MethodAccessor |
protected static class |
ResourceDMBean.NoopAccessor |
Modifier and Type | Field and Description |
---|---|
protected javax.management.MBeanAttributeInfo[] |
attrInfo |
protected java.util.HashMap<java.lang.String,ResourceDMBean.AttributeEntry> |
atts |
protected boolean |
expose_all |
protected Log |
log |
protected static java.lang.String |
MBEAN_DESCRITION |
protected java.lang.Object |
obj |
protected static java.util.List<java.lang.reflect.Method> |
OBJECT_METHODS |
protected javax.management.MBeanOperationInfo[] |
opInfo |
protected java.util.List<javax.management.MBeanOperationInfo> |
ops |
protected static java.lang.Class<?>[] |
primitives |
Constructor and Description |
---|
ResourceDMBean(java.lang.Object instance) |
Modifier and Type | Method and Description |
---|---|
protected void |
exposeManagedAttribute(java.lang.reflect.Method method) |
protected void |
findFields() |
protected static ResourceDMBean.Accessor |
findGetter(java.lang.Object target,
java.lang.String attr_name)
Finds an accessor for an attribute.
|
protected void |
findMethods() |
static ResourceDMBean.Accessor |
findSetter(java.lang.Object target,
java.lang.String attr_name)
Finds an accessor for an attribute.
|
protected void |
fixFields()
Provides field-based getter and/or setters for all attributes in atts if not present
|
java.lang.Object |
getAttribute(java.lang.String name) |
javax.management.AttributeList |
getAttributes(java.lang.String[] names) |
protected static java.lang.Class<?> |
getClassForName(java.lang.String name) |
javax.management.MBeanInfo |
getMBeanInfo() |
protected javax.management.Attribute |
getNamedAttribute(java.lang.String name) |
java.lang.Object |
invoke(java.lang.String name,
java.lang.Object[] args,
java.lang.String[] sig) |
static boolean |
isGetMethod(java.lang.reflect.Method method) |
static boolean |
isIsMethod(java.lang.reflect.Method method) |
static boolean |
isSetMethod(java.lang.reflect.Method method) |
void |
setAttribute(javax.management.Attribute attribute) |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList list) |
protected boolean |
setNamedAttribute(javax.management.Attribute attribute) |
protected static java.lang.String |
toLowerCase(java.lang.String input)
Returns a string with the first letter being lowercase
|
protected static final java.lang.Class<?>[] primitives
protected static final java.lang.String MBEAN_DESCRITION
protected static final java.util.List<java.lang.reflect.Method> OBJECT_METHODS
protected final boolean expose_all
protected final Log log
protected final java.lang.Object obj
protected final javax.management.MBeanAttributeInfo[] attrInfo
protected final javax.management.MBeanOperationInfo[] opInfo
protected final java.util.HashMap<java.lang.String,ResourceDMBean.AttributeEntry> atts
protected final java.util.List<javax.management.MBeanOperationInfo> ops
public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo
in interface javax.management.DynamicMBean
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.management.DynamicMBean
public void setAttribute(javax.management.Attribute attribute)
setAttribute
in interface javax.management.DynamicMBean
public javax.management.AttributeList getAttributes(java.lang.String[] names)
getAttributes
in interface javax.management.DynamicMBean
public javax.management.AttributeList setAttributes(javax.management.AttributeList list)
setAttributes
in interface javax.management.DynamicMBean
public java.lang.Object invoke(java.lang.String name, java.lang.Object[] args, java.lang.String[] sig) throws javax.management.MBeanException, javax.management.ReflectionException
invoke
in interface javax.management.DynamicMBean
javax.management.MBeanException
javax.management.ReflectionException
public static boolean isSetMethod(java.lang.reflect.Method method)
public static boolean isGetMethod(java.lang.reflect.Method method)
public static boolean isIsMethod(java.lang.reflect.Method method)
protected static java.lang.Class<?> getClassForName(java.lang.String name) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected void findMethods()
protected void fixFields()
protected void exposeManagedAttribute(java.lang.reflect.Method method)
protected static ResourceDMBean.Accessor findGetter(java.lang.Object target, java.lang.String attr_name)
public static ResourceDMBean.Accessor findSetter(java.lang.Object target, java.lang.String attr_name)
protected static java.lang.String toLowerCase(java.lang.String input)
protected void findFields()
protected javax.management.Attribute getNamedAttribute(java.lang.String name)
protected boolean setNamedAttribute(javax.management.Attribute attribute)
Copyright © 1998-2020 Red Hat. All Rights Reserved.