spring-framework / org.springframework.jmx.support / MBeanServerConnectionFactoryBean

MBeanServerConnectionFactoryBean

open class MBeanServerConnectionFactoryBean : FactoryBean<MBeanServerConnection>, BeanClassLoaderAware, InitializingBean, DisposableBean

FactoryBean that creates a JMX 1.2 MBeanServerConnection to a remote MBeanServer exposed via a JMXServerConnector. Exposes the MBeanServer for bean references.

Author
Rob Harrop

Author
Juergen Hoeller

Since
1.2

See Also
MBeanServerFactoryBeanConnectorServerFactoryBeanorg.springframework.jmx.access.MBeanClientInterceptor#setServerorg.springframework.jmx.access.NotificationListenerRegistrar#setServer

Constructors

<init>

MBeanServerConnectionFactoryBean()

FactoryBean that creates a JMX 1.2 MBeanServerConnection to a remote MBeanServer exposed via a JMXServerConnector. Exposes the MBeanServer for bean references.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

Creates a JMXConnector for the given settings and exposes the associated MBeanServerConnection.

destroy

open fun destroy(): Unit

Closes the underlying JMXConnector.

getObject

open fun getObject(): MBeanServerConnection

getObjectType

open fun getObjectType(): Class<out MBeanServerConnection>

isSingleton

open fun isSingleton(): Boolean

setBeanClassLoader

open fun setBeanClassLoader(classLoader: ClassLoader): Unit

setConnectOnStartup

open fun setConnectOnStartup(connectOnStartup: Boolean): Unit

Set whether to connect to the server on startup. Default is "true".

Can be turned off to allow for late start of the JMX server. In this case, the JMX connector will be fetched on first access.

setEnvironment

open fun setEnvironment(environment: Properties): Unit

Set the environment properties used to construct the JMXConnector as java.util.Properties (String key/value pairs).

setEnvironmentMap

open fun setEnvironmentMap(environment: MutableMap<String, *>): Unit

Set the environment properties used to construct the JMXConnector as a Map of String keys and arbitrary Object values.

setServiceUrl

open fun setServiceUrl(url: String): Unit

Set the service URL of the remote MBeanServer.