|
JBossMX Parent POM 6.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.jboss.mx.mxbean.MXBeanDelegate
public class MXBeanDelegate
MXBeanDelegate. FIXME: Reflection madness
Constructor Summary | |
---|---|
protected |
MXBeanDelegate(Class<?> mbeanInterface)
Construct a DynamicMBean from this object and the passed management interface class. |
|
MXBeanDelegate(Object implementation,
Class<?> mbeanInterface)
Construct a DynamicMBean from the given implementation object and the passed management interface class. |
Method Summary | |
---|---|
OpenMBeanInfo |
buildMBeanInfo()
Builds a default MBeanInfo for this MBean, using the Management Interface specified for this MBean. |
void |
cacheMBeanInfo(OpenMBeanInfo info)
Sets the cached mbean info |
Object |
getAttribute(String attribute)
|
AttributeList |
getAttributes(String[] attributes)
|
OpenMBeanInfo |
getCachedMBeanInfo()
Retrieve the cached mbean info |
Object |
getImplementation()
Retrieve the implementation object |
Class<?> |
getImplementationClass()
Retrieve the implementation class |
MBeanInfo |
getMBeanInfo()
|
Class<?> |
getMBeanInterface()
Retrieve the management interface |
Object |
invoke(String actionName,
Object[] params,
String[] signature)
|
void |
postDeregister()
|
void |
postRegister(Boolean registrationDone)
|
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
|
void |
setAttribute(Attribute attribute)
|
AttributeList |
setAttributes(AttributeList attributes)
|
void |
setImplementation(Object implementation)
Replace the implementation object |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.management.NotificationEmitter |
---|
removeNotificationListener |
Methods inherited from interface javax.management.NotificationBroadcaster |
---|
addNotificationListener, getNotificationInfo, removeNotificationListener |
Constructor Detail |
---|
public MXBeanDelegate(Object implementation, Class<?> mbeanInterface) throws NotCompliantMBeanException
implementation
- the object implementing the mbeanmbeanInterface
- the management interface of the mbean
IllegalArgumentException
- for a null implementation
NotCompliantMBeanException
- if the management interface
does not follow the JMX design patterns or the implementation
does not implement the interfaceprotected MXBeanDelegate(Class<?> mbeanInterface) throws NotCompliantMBeanException
Used in subclassing
mbeanInterface
- the management interface of the mbean
NotCompliantMBeanException
- if the management interface
does not follow the JMX design patterns or this
does not implement the interfaceMethod Detail |
---|
public Object getImplementation()
public void setImplementation(Object implementation) throws NotCompliantMBeanException
implementation
- the new implementation
IllegalArgumentException
- for a null parameter
NotCompliantMBeanException
- if the new implementation
does not implement the interface supplied at
constructionpublic Class<?> getImplementationClass()
public final Class<?> getMBeanInterface()
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
public void postDeregister()
postDeregister
in interface MBeanRegistration
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public OpenMBeanInfo getCachedMBeanInfo()
public void cacheMBeanInfo(OpenMBeanInfo info)
info
- the mbeaninfo to cache, can be null to erase the cachepublic OpenMBeanInfo buildMBeanInfo() throws NotCompliantMBeanException
NotCompliantMBeanException
- when not a valid mbean
|
JBossMX Parent POM 6.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |