public class SpringModelMBean
extends javax.management.modelmbean.RequiredModelMBean
RequiredModelMBean class that ensures the
 thread context ClassLoader is switched
 for the managed resource's ClassLoader before any invocations occur.RequiredModelMBean| Constructor and Description | 
|---|
SpringModelMBean()
Construct a new SpringModelMBean instance with an empty  
ModelMBeanInfo. | 
SpringModelMBean(javax.management.modelmbean.ModelMBeanInfo mbi)
Construct a new SpringModelMBean instance with the given  
ModelMBeanInfo. | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.Object | 
getAttribute(java.lang.String attrName)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
javax.management.AttributeList | 
getAttributes(java.lang.String[] attrNames)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
java.lang.Object | 
invoke(java.lang.String opName,
      java.lang.Object[] opArgs,
      java.lang.String[] sig)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
void | 
setAttribute(javax.management.Attribute attribute)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
javax.management.AttributeList | 
setAttributes(javax.management.AttributeList attributes)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
void | 
setManagedResource(java.lang.Object managedResource,
                  java.lang.String managedResourceType)
Sets managed resource to expose and stores its  
ClassLoader. | 
addAttributeChangeNotificationListener, addNotificationListener, getClassLoaderRepository, getMBeanInfo, getNotificationInfo, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setModelMBeanInfo, storepublic SpringModelMBean()
                 throws javax.management.MBeanException,
                        javax.management.RuntimeOperationsException
ModelMBeanInfo.javax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionRequiredModelMBean.RequiredModelMBean()public SpringModelMBean(javax.management.modelmbean.ModelMBeanInfo mbi)
                 throws javax.management.MBeanException,
                        javax.management.RuntimeOperationsException
ModelMBeanInfo.javax.management.MBeanExceptionjavax.management.RuntimeOperationsExceptionRequiredModelMBean.RequiredModelMBean(ModelMBeanInfo)public void setManagedResource(java.lang.Object managedResource,
                               java.lang.String managedResourceType)
                        throws javax.management.MBeanException,
                               javax.management.InstanceNotFoundException,
                               javax.management.modelmbean.InvalidTargetObjectTypeException
ClassLoader.setManagedResource in interface javax.management.modelmbean.ModelMBeansetManagedResource in class javax.management.modelmbean.RequiredModelMBeanjavax.management.MBeanExceptionjavax.management.InstanceNotFoundExceptionjavax.management.modelmbean.InvalidTargetObjectTypeExceptionpublic java.lang.Object invoke(java.lang.String opName,
                               java.lang.Object[] opArgs,
                               java.lang.String[] sig)
                        throws javax.management.MBeanException,
                               javax.management.ReflectionException
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.invoke in interface javax.management.DynamicMBeaninvoke in class javax.management.modelmbean.RequiredModelMBeanjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])public java.lang.Object getAttribute(java.lang.String attrName)
                              throws javax.management.AttributeNotFoundException,
                                     javax.management.MBeanException,
                                     javax.management.ReflectionException
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.getAttribute in interface javax.management.DynamicMBeangetAttribute in class javax.management.modelmbean.RequiredModelMBeanjavax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.getAttribute(java.lang.String)public javax.management.AttributeList getAttributes(java.lang.String[] attrNames)
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.getAttributes in interface javax.management.DynamicMBeangetAttributes in class javax.management.modelmbean.RequiredModelMBeanDynamicMBean.getAttributes(java.lang.String[])public void setAttribute(javax.management.Attribute attribute)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.setAttribute in interface javax.management.DynamicMBeansetAttribute in class javax.management.modelmbean.RequiredModelMBeanjavax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.setAttribute(javax.management.Attribute)public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.setAttributes in interface javax.management.DynamicMBeansetAttributes in class javax.management.modelmbean.RequiredModelMBeanDynamicMBean.setAttributes(javax.management.AttributeList)