类 MetadataNamingStrategy

java.lang.Object
cn.taketoday.jmx.export.naming.MetadataNamingStrategy
所有已实现的接口:
InitializingBean, ObjectNamingStrategy

public class MetadataNamingStrategy extends Object implements ObjectNamingStrategy, InitializingBean
An implementation of the ObjectNamingStrategy interface that reads the ObjectName from the source-level metadata. Falls back to the bean key (bean name) if no ObjectName can be found in source-level metadata.

Uses the JmxAttributeSource strategy interface, so that metadata can be read using any supported implementation. Out of the box, AnnotationJmxAttributeSource introspects a well-defined set of Java 5 annotations that come with Framework.

从以下版本开始:
4.0
作者:
Rob Harrop, Juergen Hoeller
另请参阅:
  • 构造器详细资料

  • 方法详细资料

    • setAttributeSource

      public void setAttributeSource(JmxAttributeSource attributeSource)
      Set the implementation of the JmxAttributeSource interface to use when reading the source-level metadata.
    • 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.

    • afterPropertiesSet

      public void afterPropertiesSet()
      指定者:
      afterPropertiesSet 在接口中 InitializingBean
    • getObjectName

      public ObjectName getObjectName(Object managedBean, @Nullable String beanKey) throws MalformedObjectNameException
      Reads the ObjectName from the source-level metadata associated with the managed resource's Class.
      指定者:
      getObjectName 在接口中 ObjectNamingStrategy
      参数:
      managedBean - the bean that will be exposed under the returned ObjectName
      beanKey - the key associated with this bean in the beans map passed to the MBeanExporter
      返回:
      the ObjectName instance
      抛出:
      MalformedObjectNameException - if the resulting ObjectName is invalid