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

ConnectorServerFactoryBean

open class ConnectorServerFactoryBean : MBeanRegistrationSupport, FactoryBean<JMXConnectorServer>, InitializingBean, DisposableBean

FactoryBean that creates a JSR-160 JMXConnectorServer, optionally registers it with the MBeanServer and then starts it.

The JMXConnectorServer can be started in a separate thread by setting the threaded property to true. You can configure this thread to be a daemon thread by setting the daemon property to true.

The JMXConnectorServer is correctly shutdown when an instance of this class is destroyed on shutdown of the containing ApplicationContext.

Author
Rob Harrop

Author
Juergen Hoeller

Since
1.2

See Also
JMXConnectorServerMBeanServer

Constructors

<init>

ConnectorServerFactoryBean()

FactoryBean that creates a JSR-160 JMXConnectorServer, optionally registers it with the MBeanServer and then starts it.

The JMXConnectorServer can be started in a separate thread by setting the threaded property to true. You can configure this thread to be a daemon thread by setting the daemon property to true.

The JMXConnectorServer is correctly shutdown when an instance of this class is destroyed on shutdown of the containing ApplicationContext.

Properties

DEFAULT_SERVICE_URL

static val DEFAULT_SERVICE_URL: String

The default service URL

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

Start the connector server. If the threaded flag is set to true, the JMXConnectorServer will be started in a separate thread. If the daemon flag is set to true, that thread will be started as a daemon thread.

destroy

open fun destroy(): Unit

Stop the JMXConnectorServer managed by an instance of this class. Automatically called on ApplicationContext shutdown.

getObject

open fun getObject(): JMXConnectorServer

getObjectType

open fun getObjectType(): Class<out JMXConnectorServer>

isSingleton

open fun isSingleton(): Boolean

setDaemon

open fun setDaemon(daemon: Boolean): Unit

Set whether any threads started for the JMXConnectorServer should be started as daemon threads.

setEnvironment

open fun setEnvironment(environment: Properties): Unit

Set the environment properties used to construct the JMXConnectorServer 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.

setForwarder

open fun setForwarder(forwarder: MBeanServerForwarder): Unit

Set an MBeanServerForwarder to be applied to the JMXConnectorServer.

setObjectName

open fun setObjectName(objectName: Any): Unit

Set the ObjectName used to register the JMXConnectorServer itself with the MBeanServer, as ObjectName instance or as String.

setServiceUrl

open fun setServiceUrl(serviceUrl: String): Unit

Set the service URL for the JMXConnectorServer.

setThreaded

open fun setThreaded(threaded: Boolean): Unit

Set whether the JMXConnectorServer should be started in a separate thread.