public class SpringModelMBean
extends javax.management.modelmbean.RequiredModelMBean
thread context ClassLoader
is switched
for the managed resource's <code>ClassLoader</code> before any invocations occur.Modifier and Type | Field and Description |
---|---|
private java.lang.ClassLoader |
managedResourceClassLoader
Stores the <code>ClassLoader</code> to use for invocations.
|
Constructor and Description |
---|
SpringModelMBean()
Construct a new SpringModelMBean instance with an empty <code>ModelMBeanInfo</code>.
|
SpringModelMBean(javax.management.modelmbean.ModelMBeanInfo mbi)
Construct a new SpringModelMBean instance with the given <code>ModelMBeanInfo</code>.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String attrName)
Switches the
context ClassLoader for the
managed resources <code>ClassLoader</code> before allowing the invocation to occur. |
javax.management.AttributeList |
getAttributes(java.lang.String[] attrNames)
Switches the
context ClassLoader for the
managed resources <code>ClassLoader</code> 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 <code>ClassLoader</code> before allowing the invocation to occur. |
void |
setAttribute(javax.management.Attribute attribute)
Switches the
context ClassLoader for the
managed resources <code>ClassLoader</code> before allowing the invocation to occur. |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Switches the
context ClassLoader for the
managed resources <code>ClassLoader</code> before allowing the invocation to occur. |
void |
setManagedResource(java.lang.Object managedResource,
java.lang.String managedResourceType)
Sets managed resource to expose and stores its <code>ClassLoader</code>.
|
addAttributeChangeNotificationListener, addNotificationListener, getClassLoaderRepository, getMBeanInfo, getNotificationInfo, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setModelMBeanInfo, store
private java.lang.ClassLoader managedResourceClassLoader
public SpringModelMBean() throws javax.management.MBeanException, javax.management.RuntimeOperationsException
javax.management.MBeanException
javax.management.RuntimeOperationsException
RequiredModelMBean.RequiredModelMBean()
public SpringModelMBean(javax.management.modelmbean.ModelMBeanInfo mbi) throws javax.management.MBeanException, javax.management.RuntimeOperationsException
javax.management.MBeanException
javax.management.RuntimeOperationsException
RequiredModelMBean.RequiredModelMBean(ModelMBeanInfo)
public void setManagedResource(java.lang.Object managedResource, java.lang.String managedResourceType) throws javax.management.MBeanException, javax.management.InstanceNotFoundException, javax.management.modelmbean.InvalidTargetObjectTypeException
setManagedResource
in interface javax.management.modelmbean.ModelMBean
setManagedResource
in class javax.management.modelmbean.RequiredModelMBean
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.modelmbean.InvalidTargetObjectTypeException
public 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 <code>ClassLoader</code> before allowing the invocation to occur.invoke
in interface javax.management.DynamicMBean
invoke
in class javax.management.modelmbean.RequiredModelMBean
javax.management.MBeanException
javax.management.ReflectionException
DynamicMBean.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 <code>ClassLoader</code> before allowing the invocation to occur.getAttribute
in interface javax.management.DynamicMBean
getAttribute
in class javax.management.modelmbean.RequiredModelMBean
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
DynamicMBean.getAttribute(java.lang.String)
public javax.management.AttributeList getAttributes(java.lang.String[] attrNames)
context ClassLoader
for the
managed resources <code>ClassLoader</code> before allowing the invocation to occur.getAttributes
in interface javax.management.DynamicMBean
getAttributes
in class javax.management.modelmbean.RequiredModelMBean
DynamicMBean.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 <code>ClassLoader</code> before allowing the invocation to occur.setAttribute
in interface javax.management.DynamicMBean
setAttribute
in class javax.management.modelmbean.RequiredModelMBean
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)
context ClassLoader
for the
managed resources <code>ClassLoader</code> before allowing the invocation to occur.setAttributes
in interface javax.management.DynamicMBean
setAttributes
in class javax.management.modelmbean.RequiredModelMBean
DynamicMBean.setAttributes(javax.management.AttributeList)