org.springframework.jmx.support

## 类 MBeanServerConnectionFactoryBean

- java.lang.Object
- - org.springframework.jmx.support.MBeanServerConnectionFactoryBean

- 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<MBeanServerConnection>, org.springframework.beans.factory.InitializingBean

      public class MBeanServerConnectionFactoryBean
      extends Object
      implements org.springframework.beans.factory.FactoryBean<MBeanServerConnection>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

  `FactoryBean` that creates a JMX 1.2 `MBeanServerConnection` to a remote `MBeanServer` exposed via a `JMXServerConnector`. Exposes the `MBeanServer` for bean references.
  从以下版本开始:
    1.2
  作者:
    Rob Harrop, Juergen Hoeller
  另请参阅:
    `MBeanServerFactoryBean`, `ConnectorServerFactoryBean`, `MBeanClientInterceptor.setServer(javax.management.MBeanServerConnection)`, `NotificationListenerRegistrar.setServer(javax.management.MBeanServerConnection)`

- - ### 构造器概要

    构造器
    构造器和说明
    `MBeanServerConnectionFactoryBean()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()` Creates a `JMXConnector` for the given settings and exposes the associated `MBeanServerConnection`.
    `void` | `destroy()` Closes the underlying `JMXConnector`.
    `MBeanServerConnection` | `getObject()`
    `Class<? extends MBeanServerConnection>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setBeanClassLoader(ClassLoader classLoader)`
    `void` | `setConnectOnStartup(boolean connectOnStartup)` Set whether to connect to the server on startup.
    `void` | `setEnvironment(Properties environment)` Set the environment properties used to construct the `JMXConnector` as `java.util.Properties` (String key/value pairs).
    `void` | `setEnvironmentMap(Map<String,?> environment)` Set the environment properties used to construct the `JMXConnector` as a `Map` of String keys and arbitrary Object values.
    `void` | `setServiceUrl(String url)` Set the service URL of the remote `MBeanServer`.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### MBeanServerConnectionFactoryBean

          public MBeanServerConnectionFactoryBean()

  - ### 方法详细资料

    - #### setServiceUrl

          public void setServiceUrl(String url)
                             throws MalformedURLException

      Set the service URL of the remote `MBeanServer`.
      抛出:
        `MalformedURLException`

    - #### setEnvironment

          public void setEnvironment(Properties environment)

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

    - #### setEnvironmentMap

          public void setEnvironmentMap(@Nullable
                                        Map<String,?> environment)

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

    - #### setConnectOnStartup

          public void setConnectOnStartup(boolean connectOnStartup)

      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.

    - #### setBeanClassLoader

          public void setBeanClassLoader(ClassLoader classLoader)

      指定者:
        `setBeanClassLoader` 在接口中 `org.springframework.beans.factory.BeanClassLoaderAware`

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws IOException

      Creates a `JMXConnector` for the given settings and exposes the associated `MBeanServerConnection`.
      指定者:
        `afterPropertiesSet` 在接口中 `org.springframework.beans.factory.InitializingBean`
      抛出:
        `IOException`

    - #### getObject

          @Nullable
          public MBeanServerConnection getObject()

      指定者:
        `getObject` 在接口中 `org.springframework.beans.factory.FactoryBean<MBeanServerConnection>`

    - #### getObjectType

          public Class<? extends MBeanServerConnection> getObjectType()

      指定者:
        `getObjectType` 在接口中 `org.springframework.beans.factory.FactoryBean<MBeanServerConnection>`

    - #### isSingleton

          public boolean isSingleton()

      指定者:
        `isSingleton` 在接口中 `org.springframework.beans.factory.FactoryBean<MBeanServerConnection>`

    - #### destroy

          public void destroy()
                       throws IOException

      Closes the underlying `JMXConnector`.
      指定者:
        `destroy` 在接口中 `org.springframework.beans.factory.DisposableBean`
      抛出:
        `IOException`