|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.baswell.easybeans.EasyBeanWrapper
public class EasyBeanWrapper
Wraps a Java object to exposure their attributes and operations as a DynamicMBean. If you want to broadcast JMX notifications
use EasyBeanNotificationWrapper
Constructor Summary | |
---|---|
EasyBeanWrapper(java.lang.Object bean)
|
|
EasyBeanWrapper(java.lang.Object bean,
EasyBeanExposure exposure)
|
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String attribute)
|
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
|
javax.management.MBeanInfo |
getMBeanInfo()
|
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
|
void |
register()
Registers this MBean with the platform MBeanServer |
void |
register(javax.management.MBeanServer mBeanServer)
Registers this MBean with the given MBeanServer. |
void |
setAttribute(javax.management.Attribute attribute)
|
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
|
void |
unregister()
Unregisters this MBean from the platform MBeanServer |
void |
unregister(javax.management.MBeanServer mBeanServer)
Unregisters this MBean from the given MBeanServer * |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EasyBeanWrapper(java.lang.Object bean) throws InvalidEasyBeanNameException, InvalidEasyBeanAnnotation, InvalidEasyBeanOpenType
bean
- The bean to wrap as a DynamicMBean.
InvalidEasyBeanNameException
- If the ObjectName used for this bean in invalid.
InvalidEasyBeanAnnotation
- If an EasyBean annotation is used incorrectly.
InvalidEasyBeanOpenType
- If the given object (or a descendant of this object) cannot be mapped to an OpenType.public EasyBeanWrapper(java.lang.Object bean, EasyBeanExposure exposure) throws InvalidEasyBeanNameException, InvalidEasyBeanAnnotation, InvalidEasyBeanOpenType
bean
- The bean to wrap as a DynamicMBean.exposure
- Overrides the EasyBeanExposure annotated by the given bean object.
InvalidEasyBeanNameException
- If the ObjectName used for this bean in invalid.
InvalidEasyBeanAnnotation
- If an EasyBean annotation is used incorrectly.
InvalidEasyBeanOpenType
- If the given object (or a descendant of this object) cannot be mapped to an OpenType.Method Detail |
---|
public void register() throws ObjectNameAlreadyRegistered, UnexpectedEasyBeanException
ObjectNameAlreadyRegistered
- If the object name of this MBean has already been registered.
UnexpectedEasyBeanException
- If the registration could not occur from some other unexpected reason.ManagementFactory.getPlatformMBeanServer()
public void register(javax.management.MBeanServer mBeanServer) throws ObjectNameAlreadyRegistered, UnexpectedEasyBeanException
mBeanServer
- The server to register this MBean with.
ObjectNameAlreadyRegistered
- If the object name of this MBean has already been registered.
UnexpectedEasyBeanException
- If the registration could not occur from some other unexpected reason.public void unregister() throws UnexpectedEasyBeanException
UnexpectedEasyBeanException
- If the unregister action could not occur from some other unexpected reason.ManagementFactory.getPlatformMBeanServer()
public void unregister(javax.management.MBeanServer mBeanServer) throws UnexpectedEasyBeanException
mBeanServer
- The server to unregister this MBean from.
UnexpectedEasyBeanException
- If the unregister action could not occur from some other unexpected reason.public java.lang.Object getAttribute(java.lang.String attribute) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
getAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes
in interface javax.management.DynamicMBean
public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo
in interface javax.management.DynamicMBean
DynamicMBean.getMBeanInfo()
public java.lang.Object invoke(java.lang.String actionName, 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
DynamicMBean.invoke(String, Object[], String[])
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
setAttribute
in interface javax.management.DynamicMBean
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
DynamicMBean.setAttribute(javax.management.Attribute)
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes
in interface javax.management.DynamicMBean
DynamicMBean.setAttributes(javax.management.AttributeList)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |