public class SpringModelMBean extends 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(ModelMBeanInfo mbi)
Construct a new SpringModelMBean instance with the given  
ModelMBeanInfo. | 
| Modifier and Type | Method and Description | 
|---|---|
Object | 
getAttribute(String attrName)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
AttributeList | 
getAttributes(String[] attrNames)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
Object | 
invoke(String opName,
      Object[] opArgs,
      String[] sig)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
void | 
setAttribute(Attribute attribute)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
AttributeList | 
setAttributes(AttributeList attributes)
Switches the  
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur. | 
void | 
setManagedResource(Object managedResource,
                  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 MBeanException,
                        RuntimeOperationsException
ModelMBeanInfo.MBeanExceptionRuntimeOperationsExceptionRequiredModelMBean.RequiredModelMBean()public SpringModelMBean(ModelMBeanInfo mbi) throws MBeanException, RuntimeOperationsException
ModelMBeanInfo.public void setManagedResource(Object managedResource, String managedResourceType) throws MBeanException, InstanceNotFoundException, InvalidTargetObjectTypeException
ClassLoader.setManagedResource in interface ModelMBeansetManagedResource in class RequiredModelMBeanMBeanExceptionInstanceNotFoundExceptionInvalidTargetObjectTypeExceptionpublic Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.invoke in interface DynamicMBeaninvoke in class RequiredModelMBeanMBeanExceptionReflectionExceptionDynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])public Object getAttribute(String attrName) throws AttributeNotFoundException, MBeanException, ReflectionException
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.getAttribute in interface DynamicMBeangetAttribute in class RequiredModelMBeanAttributeNotFoundExceptionMBeanExceptionReflectionExceptionDynamicMBean.getAttribute(java.lang.String)public AttributeList getAttributes(String[] attrNames)
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.getAttributes in interface DynamicMBeangetAttributes in class RequiredModelMBeanDynamicMBean.getAttributes(java.lang.String[])public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.setAttribute in interface DynamicMBeansetAttribute in class RequiredModelMBeanAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionDynamicMBean.setAttribute(javax.management.Attribute)public AttributeList setAttributes(AttributeList attributes)
context ClassLoader for the
 managed resources ClassLoader before allowing the invocation to occur.setAttributes in interface DynamicMBeansetAttributes in class RequiredModelMBeanDynamicMBean.setAttributes(javax.management.AttributeList)