public class

SpringModelMBean

extends RequiredModelMBean
java.lang.Object
   ↳ javax.management.modelmbean.RequiredModelMBean
     ↳ org.springframework.jmx.export.SpringModelMBean

Class Overview

Extension of the RequiredModelMBean class that ensures the thread context ClassLoader is switched for the managed resource's ClassLoader before any invocations occur.

Summary

Public Constructors
SpringModelMBean()
Construct a new SpringModelMBean instance with an empty ModelMBeanInfo.
SpringModelMBean(ModelMBeanInfo mbi)
Construct a new SpringModelMBean instance with the given ModelMBeanInfo.
Public Methods
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.
[Expand]
Inherited Methods
From class javax.management.modelmbean.RequiredModelMBean
From class java.lang.Object
From interface javax.management.DynamicMBean
From interface javax.management.MBeanRegistration
From interface javax.management.NotificationBroadcaster
From interface javax.management.NotificationEmitter
From interface javax.management.PersistentMBean
From interface javax.management.modelmbean.ModelMBean
From interface javax.management.modelmbean.ModelMBeanNotificationBroadcaster

Public Constructors

public SpringModelMBean ()

Construct a new SpringModelMBean instance with an empty ModelMBeanInfo.

public SpringModelMBean (ModelMBeanInfo mbi)

Construct a new SpringModelMBean instance with the given ModelMBeanInfo.

Public Methods

public Object getAttribute (String attrName)

Switches the context ClassLoader for the managed resources ClassLoader before allowing the invocation to occur.

public AttributeList getAttributes (String[] attrNames)

Switches the context ClassLoader for the managed resources ClassLoader before allowing the invocation to occur.

public Object invoke (String opName, Object[] opArgs, String[] sig)

Switches the context ClassLoader for the managed resources ClassLoader before allowing the invocation to occur.

public void setAttribute (Attribute attribute)

Switches the context ClassLoader for the managed resources ClassLoader before allowing the invocation to occur.

public AttributeList setAttributes (AttributeList attributes)

Switches the context ClassLoader for the managed resources ClassLoader before allowing the invocation to occur.

public void setManagedResource (Object managedResource, String managedResourceType)

Sets managed resource to expose and stores its ClassLoader.