org.springframework.jmx.export.annotation

## 类 AnnotationMBeanExporter

- java.lang.Object
- - org.springframework.jmx.support.MBeanRegistrationSupport
  - - org.springframework.jmx.export.MBeanExporter
    - - org.springframework.jmx.export.annotation.AnnotationMBeanExporter

- 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.SmartInitializingSingleton, MBeanExportOperations

      public class AnnotationMBeanExporter
      extends MBeanExporter

  Convenient subclass of Spring's standard `MBeanExporter`, activating Java 5 annotation usage for JMX exposure of Spring beans: `ManagedResource`, `ManagedAttribute`, `ManagedOperation`, etc.

  Sets a `MetadataNamingStrategy` and a `MetadataMBeanInfoAssembler` with an `AnnotationJmxAttributeSource`, and activates the `MBeanExporter.AUTODETECT_ALL` mode by default.

  从以下版本开始:
    2.5
  作者:
    Juergen Hoeller

- - ### 字段概要

    - ### 从类继承的字段 org.springframework.jmx.export.MBeanExporter

      `AUTODETECT_ALL, AUTODETECT_ASSEMBLER, AUTODETECT_MBEAN, AUTODETECT_NONE`

    - ### 从类继承的字段 org.springframework.jmx.support.MBeanRegistrationSupport

      `logger, server`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)` This callback is only required for resolution of bean names in the `"beans"` `Map` and for autodetection of MBeans (in the latter case, a `ListableBeanFactory` is required).
    `void` | `setDefaultDomain(String defaultDomain)` Specify the default domain to be used for generating ObjectNames when no source-level metadata has been specified.

    - ### 从类继承的方法 org.springframework.jmx.export.MBeanExporter

      `adaptMBeanIfPossible, addExcludedBean, afterPropertiesSet, afterSingletonsInstantiated, createAndConfigureMBean, createModelMBean, destroy, getObjectName, isBeanDefinitionLazyInit, isMBean, onRegister, onUnregister, registerBeanNameOrInstance, registerBeans, registerManagedResource, registerManagedResource, setAllowEagerInit, setAssembler, setAutodetect, setAutodetectMode, setAutodetectModeName, setBeanClassLoader, setBeans, setEnsureUniqueRuntimeObjectNames, setExcludedBeans, setExposeManagedResourceClassLoader, setListeners, setNamingStrategy, setNotificationListenerMappings, setNotificationListeners, unregisterManagedResource`

    - ### 从类继承的方法 org.springframework.jmx.support.MBeanRegistrationSupport

      `doRegister, doUnregister, getRegisteredObjectNames, getServer, onRegister, setRegistrationPolicy, setServer, unregisterBeans`

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

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

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

    - #### AnnotationMBeanExporter

          public AnnotationMBeanExporter()

  - ### 方法详细资料

    - #### setDefaultDomain

          public void setDefaultDomain(String defaultDomain)

      Specify the default domain to be used for generating ObjectNames when no source-level metadata has been specified.

      The default is to use the domain specified in the bean name (if the bean name follows the JMX ObjectName syntax); else, the package name of the managed bean class.

      另请参阅:
        `MetadataNamingStrategy.setDefaultDomain(java.lang.String)`

    - #### setBeanFactory

          public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)

      从类复制的说明: `MBeanExporter`
      This callback is only required for resolution of bean names in the `"beans"` `Map` and for autodetection of MBeans (in the latter case, a `ListableBeanFactory` is required).
      指定者:
        `setBeanFactory` 在接口中 `org.springframework.beans.factory.BeanFactoryAware`
      覆盖:
        `setBeanFactory` 在类中 `MBeanExporter`
      另请参阅:
        `MBeanExporter.setBeans(java.util.Map<java.lang.String, java.lang.Object>)`, `MBeanExporter.setAutodetect(boolean)`