public class ResourceDMBean extends Object implements 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 |
static class |
ResourceDMBean.NoopAccessor |
Modifier and Type | Field and Description |
---|---|
protected MBeanAttributeInfo[] |
attrInfo |
protected HashMap<String,ResourceDMBean.AttributeEntry> |
atts |
protected boolean |
expose_all |
protected Log |
log |
protected Object |
obj |
protected static List<Method> |
OBJECT_METHODS |
protected List<Object> |
objs |
protected MBeanOperationInfo[] |
opInfo |
protected List<MBeanOperationInfo> |
ops |
protected static Class<?>[] |
primitives |
Constructor and Description |
---|
ResourceDMBean(Object instance) |
Modifier and Type | Method and Description |
---|---|
static void |
dumpStats(Object obj,
Map<String,Object> map,
Log log) |
protected void |
exposeManagedAttribute(Method method,
Object instance) |
protected void |
findFields(Object instance) |
protected static ResourceDMBean.Accessor |
findGetter(Object target,
String attr_name)
Finds an accessor for an attribute.
|
protected void |
findMethods(Object instance) |
static ResourceDMBean.Accessor |
findSetter(Object target,
String attr_name)
Finds an accessor for an attribute.
|
protected void |
fixFields(Object instance)
Provides field-based getter and/or setters for all attributes in attrs if not present
|
Object |
getAttribute(String name) |
AttributeList |
getAttributes(String[] names) |
protected static Class<?> |
getClassForName(String name) |
MBeanInfo |
getMBeanInfo() |
protected Attribute |
getNamedAttribute(String name) |
Object |
invoke(String name,
Object[] args,
String[] sig) |
static boolean |
isGetMethod(Method method) |
static boolean |
isIsMethod(Method method) |
static boolean |
isSetMethod(Method method) |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList list) |
protected boolean |
setNamedAttribute(Attribute attribute) |
protected static String |
toLowerCase(String input)
Returns a string with the first letter being lowercase
|
protected static final Class<?>[] primitives
protected final boolean expose_all
protected final Log log
protected final Object obj
protected final MBeanAttributeInfo[] attrInfo
protected final MBeanOperationInfo[] opInfo
protected final HashMap<String,ResourceDMBean.AttributeEntry> atts
protected final List<MBeanOperationInfo> ops
public ResourceDMBean(Object instance)
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public Object getAttribute(String name)
getAttribute
in interface DynamicMBean
public void setAttribute(Attribute attribute)
setAttribute
in interface DynamicMBean
public AttributeList getAttributes(String[] names)
getAttributes
in interface DynamicMBean
public AttributeList setAttributes(AttributeList list)
setAttributes
in interface DynamicMBean
public Object invoke(String name, Object[] args, String[] sig) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public static boolean isSetMethod(Method method)
public static boolean isGetMethod(Method method)
public static boolean isIsMethod(Method method)
protected static Class<?> getClassForName(String name) throws ClassNotFoundException
ClassNotFoundException
protected void findMethods(Object instance)
protected void fixFields(Object instance)
protected static ResourceDMBean.Accessor findGetter(Object target, String attr_name)
public static ResourceDMBean.Accessor findSetter(Object target, String attr_name)
protected static String toLowerCase(String input)
protected void findFields(Object instance)
protected boolean setNamedAttribute(Attribute attribute)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.