org.springframework.jmx.export.naming

Class MetadataNamingStrategy

  • java.lang.Object
    • org.springframework.jmx.export.naming.MetadataNamingStrategy
    • Method Detail

      • 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(java.lang.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()
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean
      • getObjectName

        public javax.management.ObjectName getObjectName(java.lang.Object managedBean,
                                                         @Nullable
                                                         java.lang.String beanKey)
                                                  throws javax.management.MalformedObjectNameException
        Reads the ObjectName from the source-level metadata associated with the managed resource's Class.
        Specified by:
        getObjectName in interface ObjectNamingStrategy
        Parameters:
        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
        Returns:
        the ObjectName instance
        Throws:
        javax.management.MalformedObjectNameException - if the resulting ObjectName is invalid