|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.modelmbean.RequiredModelMBean org.springframework.jmx.export.SpringModelMBean
public class SpringModelMBean
Extension of the RequiredModelMBean
class that ensures the
thread context ClassLoader
is switched
for the managed resource's ClassLoader
before any invocations occur.
RequiredModelMBean
Field Summary | |
---|---|
private java.lang.ClassLoader |
managedResourceClassLoader
Stores the ClassLoader to use for invocations. |
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
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 . |
Methods inherited from class javax.management.modelmbean.RequiredModelMBean |
---|
addAttributeChangeNotificationListener, addNotificationListener, getClassLoaderRepository, getMBeanInfo, getNotificationInfo, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setModelMBeanInfo, store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.ClassLoader managedResourceClassLoader
ClassLoader
to use for invocations. Defaults
to the current thread ClassLoader
.
Constructor Detail |
---|
public SpringModelMBean() throws javax.management.MBeanException, javax.management.RuntimeOperationsException
ModelMBeanInfo
.
javax.management.MBeanException
javax.management.RuntimeOperationsException
RequiredModelMBean.RequiredModelMBean()
public SpringModelMBean(javax.management.modelmbean.ModelMBeanInfo mbi) throws javax.management.MBeanException, javax.management.RuntimeOperationsException
ModelMBeanInfo
.
javax.management.MBeanException
javax.management.RuntimeOperationsException
RequiredModelMBean.RequiredModelMBean(ModelMBeanInfo)
Method Detail |
---|
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.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 ClassLoader
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 ClassLoader
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 ClassLoader
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 ClassLoader
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 ClassLoader
before allowing the invocation to occur.
setAttributes
in interface javax.management.DynamicMBean
setAttributes
in class javax.management.modelmbean.RequiredModelMBean
DynamicMBean.setAttributes(javax.management.AttributeList)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |