|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.reflect.DynamicMBeanDelegator<TRECEIVER>
public class DynamicMBeanDelegator<TRECEIVER>
An generic reflection based implementation for applying a DynamicMBean interface on a another object that actually does not need to implement the DynamicMBean interface.
The dynamic method invocations and attribute access will be delegated on the internally held receiver object.
The generic type TRECEIVER represents the type of the internal object that is the target for all method invocations and attribute access.
Constructor Summary | |
---|---|
DynamicMBeanDelegator(TRECEIVER receiver)
Initialize the new instance with the target object. |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String attrName)
Returns the value of the attribute with the given name. |
javax.management.AttributeList |
getAttributes(java.lang.String[] attrNames)
Returns all the attributes with the specified names. |
protected javax.management.MBeanInfo |
getManagedBeanInfo()
|
javax.management.MBeanInfo |
getMBeanInfo()
Returns the meta data describing the supported attributes and methods. |
TRECEIVER |
getReceiver()
|
java.lang.Object |
invoke(java.lang.String methodName,
java.lang.Object[] params,
java.lang.String[] signature)
Executes the methods that are supported via JMX. |
void |
setAttribute(javax.management.Attribute attr)
Sets the specified attribute. |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Sets all specified attributes. |
void |
setManagedBeanInfo(javax.management.MBeanInfo newValue)
|
void |
setReceiver(TRECEIVER newValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynamicMBeanDelegator(TRECEIVER receiver)
Method Detail |
---|
public TRECEIVER getReceiver()
public void setReceiver(TRECEIVER newValue)
protected javax.management.MBeanInfo getManagedBeanInfo()
public void setManagedBeanInfo(javax.management.MBeanInfo newValue)
public java.lang.Object invoke(java.lang.String methodName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException
invoke
in interface javax.management.DynamicMBean
javax.management.MBeanException
javax.management.ReflectionException
public java.lang.Object getAttribute(java.lang.String attrName) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, ReflectionException
getAttribute
in interface javax.management.DynamicMBean
attrName
- The name of the attribute to be returned
javax.management.AttributeNotFoundException
- if the attribute with the given name cannot be found.
javax.management.MBeanException
ReflectionException
public void setAttribute(javax.management.Attribute attr) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, ReflectionException
setAttribute
in interface javax.management.DynamicMBean
attr
- The attribute with name and value.
javax.management.AttributeNotFoundException
- if the attribute with the given name cannot be found.
javax.management.InvalidAttributeValueException
javax.management.MBeanException
ReflectionException
public javax.management.AttributeList getAttributes(java.lang.String[] attrNames)
getAttributes
in interface javax.management.DynamicMBean
IllegalArgument
- In any case of problem setting one of the attributes.
The original exception will be available via getCause().public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes
in interface javax.management.DynamicMBean
IllegalArgument
- In any case of problem setting one of the attributes.
The original exception will be available via getCause().public javax.management.MBeanInfo getMBeanInfo()
setManagedBeanInfo(MBeanInfo)
method can be used to set the
meta data.
getMBeanInfo
in interface javax.management.DynamicMBean
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |