|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.standardmbean.StandardMBeanImpl
public class StandardMBeanImpl
A helper class to allow standard mbeans greater control over their management interface.
Extending this class actually makes the mbean a dynamic mbean, but with the convenience of a standard mbean.
Constructor Summary | |
---|---|
protected |
StandardMBeanImpl(Class mbeanInterface)
Construct a DynamicMBean from this object and the passed management interface class. |
|
StandardMBeanImpl(Object implementation,
Class mbeanInterface)
Construct a DynamicMBean from the given implementation object and the passed management interface class. |
Method Summary | |
---|---|
MBeanInfo |
buildMBeanInfo()
Builds a default MBeanInfo for this MBean, using the Management Interface specified for this MBean. |
void |
cacheMBeanInfo(MBeanInfo info)
Sets the cached mbean info |
Object |
getAttribute(String attribute)
|
AttributeList |
getAttributes(String[] attributes)
|
MBeanInfo |
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 |
setAttribute(Attribute attribute)
|
AttributeList |
setAttributes(AttributeList attributes)
|
void |
setImplementation(Object implementation)
Replace the implementation object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardMBeanImpl(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 StandardMBeanImpl(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()
getImplementation
in interface StandardMBeanDelegate
public void setImplementation(Object implementation) throws NotCompliantMBeanException
setImplementation
in interface StandardMBeanDelegate
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()
getMBeanInterface
in interface StandardMBeanDelegate
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 MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public MBeanInfo getCachedMBeanInfo()
getCachedMBeanInfo
in interface StandardMBeanDelegate
public void cacheMBeanInfo(MBeanInfo info)
cacheMBeanInfo
in interface StandardMBeanDelegate
info
- the mbeaninfo to cache, can be null to erase the cachepublic MBeanInfo buildMBeanInfo() throws NotCompliantMBeanException
buildMBeanInfo
in interface StandardMBeanDelegate
NotCompliantMBeanException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |