spring-framework / org.springframework.jmx.export / SpringModelMBean

SpringModelMBean

open class SpringModelMBean : RequiredModelMBean

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

Author
Rob Harrop

Since
2.0

See Also
RequiredModelMBean

Constructors

<init>

SpringModelMBean()

Construct a new SpringModelMBean instance with an empty ModelMBeanInfo.

SpringModelMBean(mbi: ModelMBeanInfo)

Construct a new SpringModelMBean instance with the given ModelMBeanInfo.

Functions

getAttribute

open fun getAttribute(attrName: String): Any

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

getAttributes

open fun getAttributes(attrNames: Array<String>): AttributeList

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

invoke

open fun invoke(opName: String, opArgs: Array<Any>, sig: Array<String>): Any

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

setAttribute

open fun setAttribute(attribute: Attribute): Unit

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

setAttributes

open fun setAttributes(attributes: AttributeList): AttributeList

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

setManagedResource

open fun setManagedResource(managedResource: Any, managedResourceType: String): Unit

Sets managed resource to expose and stores its ClassLoader.