spring-framework / org.springframework.jmx.access / MBeanProxyFactoryBean

MBeanProxyFactoryBean

open class MBeanProxyFactoryBean : MBeanClientInterceptor, FactoryBean<Any>, BeanClassLoaderAware, InitializingBean

Creates a proxy to a managed resource running either locally or remotely. The "proxyInterface" property defines the interface that the generated proxy is supposed to implement. This interface should define methods and properties that correspond to operations and attributes in the management interface of the resource you wish to proxy.

There is no need for the managed resource to implement the proxy interface, although you may find it convenient to do. It is not required that every operation and attribute in the management interface is matched by a corresponding property or method in the proxy interface.

Attempting to invoke or access any method or property on the proxy interface that does not correspond to the management interface will lead to an InvalidInvocationException.

Author
Rob Harrop

Author
Juergen Hoeller

Since
1.2

See Also
MBeanClientInterceptorInvalidInvocationException

Constructors

<init>

MBeanProxyFactoryBean()

Creates a proxy to a managed resource running either locally or remotely. The "proxyInterface" property defines the interface that the generated proxy is supposed to implement. This interface should define methods and properties that correspond to operations and attributes in the management interface of the resource you wish to proxy.

There is no need for the managed resource to implement the proxy interface, although you may find it convenient to do. It is not required that every operation and attribute in the management interface is matched by a corresponding property or method in the proxy interface.

Attempting to invoke or access any method or property on the proxy interface that does not correspond to the management interface will lead to an InvalidInvocationException.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

Checks that the proxyInterface has been specified and then generates the proxy for the target MBean.

getObject

open fun getObject(): Any

getObjectType

open fun getObjectType(): Class<*>

isSingleton

open fun isSingleton(): Boolean

setBeanClassLoader

open fun setBeanClassLoader(classLoader: ClassLoader): Unit

setProxyInterface

open fun setProxyInterface(proxyInterface: Class<*>): Unit

Set the interface that the generated proxy will implement.

This will usually be a management interface that matches the target MBean, exposing bean property setters and getters for MBean attributes and conventional Java methods for MBean operations.