|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.capability.ReflectedMBeanDispatcher
Directs DynamicMBean calls to underlying resource via reflection. It's suitable for use as a StandardMBean or as the resource for a ModelMBean.
Nested Class Summary | |
static class |
ReflectedMBeanDispatcher.MethodPair
|
Constructor Summary | |
ReflectedMBeanDispatcher(MBeanInfo mbinfo,
AttributeOperationResolver resolver,
Object resource)
|
Method Summary | |
void |
bindAttributeAt(int position,
Method getter,
Method setter)
|
void |
bindOperationAt(int position,
Method method)
|
Object |
getAttribute(String attribute)
Returns the value of the attribute with the name matching the passed string. |
AttributeList |
getAttributes(String[] attributes)
Returns the values of the attributes with names matching the passed string array. |
MBeanInfo |
getMBeanInfo()
Returns the management interface that describes this dynamic resource. |
protected MBeanNotificationInfo[] |
getNotificationInfo()
|
String |
getResourceClassName()
|
protected Object |
getResourceObject()
|
Object |
invoke(String actionName,
Object[] params,
String[] signature)
Invokes a resource operation. |
protected String |
opKeyString(String name,
String[] signature)
|
void |
setAttribute(Attribute attribute)
Sets the value of an attribute. |
AttributeList |
setAttributes(AttributeList attributes)
Sets the values of the attributes passed as an AttributeList of name and new value pairs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReflectedMBeanDispatcher(MBeanInfo mbinfo, AttributeOperationResolver resolver, Object resource)
Method Detail |
public void bindOperationAt(int position, Method method)
public void bindAttributeAt(int position, Method getter, Method setter)
public String getResourceClassName()
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
DynamicMBean
getAttribute
in interface DynamicMBean
attribute
- the name of the attribute.
ReflectionException
- wraps any error invoking the resource.
MBeanException
- wraps any error thrown by the resource when
getting the attribute.
AttributeNotFoundException
- when there is no such attribute.public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
DynamicMBean
Attribute
.
setAttribute
in interface DynamicMBean
attribute
- the name and new value of the attribute.
MBeanException
- wraps any error thrown by the resource when
setting the new value.
ReflectionException
- wraps any error invoking the resource.
InvalidAttributeValueException
- when the new value cannot be
converted to the type of the attribute.
AttributeNotFoundException
- when there is no such attribute.Attribute
public AttributeList getAttributes(String[] attributes)
DynamicMBean
getAttributes
in interface DynamicMBean
attributes
- the names of the attribute.
AttributeList
of name and value pairs.public AttributeList setAttributes(AttributeList attributes)
DynamicMBean
AttributeList
of name and new value pairs.
setAttributes
in interface DynamicMBean
attributes
- the name an new value pairs.
AttributeList
of name and value pairs
that were actually set.public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
DynamicMBean
invoke
in interface DynamicMBean
actionName
- the name of the operation to perform.params
- the parameters to pass to the operation.signature
- the signartures of the parameters.
ReflectionException
- wraps any error invoking the resource.
MBeanException
- wraps any error thrown by the resource when
performing the operation.public MBeanInfo getMBeanInfo()
DynamicMBean
getMBeanInfo
in interface DynamicMBean
protected MBeanNotificationInfo[] getNotificationInfo()
protected Object getResourceObject()
protected final String opKeyString(String name, String[] signature)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |