org.springframework.jmx.export.naming

Interface ObjectNamingStrategy

  • All Known Implementing Classes:
    IdentityNamingStrategy, KeyNamingStrategy, MetadataNamingStrategy
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


    @FunctionalInterface
    public interface ObjectNamingStrategy
    Strategy interface that encapsulates the creation of ObjectName instances.

    Used by the MBeanExporter to obtain ObjectNames when registering beans.

    Since:
    1.2
    Author:
    Rob Harrop
    See Also:
    MBeanExporter, ObjectName
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      javax.management.ObjectName getObjectName(java.lang.Object managedBean, java.lang.String beanKey)
      Obtain an ObjectName for the supplied bean.
    • Method Detail

      • getObjectName

        javax.management.ObjectName getObjectName(java.lang.Object managedBean,
                                                  @Nullable
                                                  java.lang.String beanKey)
                                           throws javax.management.MalformedObjectNameException
        Obtain an ObjectName for the supplied bean.
        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