Save This Page
Home » spring-framework-2.5.4 » org.springframework » jmx » export » naming » [javadoc | source]
org.springframework.jmx.export.naming
public class: MetadataNamingStrategy [javadoc | source]
java.lang.Object
   org.springframework.jmx.export.naming.MetadataNamingStrategy

All Implemented Interfaces:
    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, two strategies are included:

Constructor:
 public MetadataNamingStrategy() 
 public MetadataNamingStrategy(JmxAttributeSource attributeSource) 
    Create a new MetadataNamingStrategy for the given JmxAttributeSource.
    Parameters:
    attributeSource - the JmxAttributeSource to use
Method from org.springframework.jmx.export.naming.MetadataNamingStrategy Summary:
afterPropertiesSet,   getObjectName,   setAttributeSource,   setDefaultDomain
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.jmx.export.naming.MetadataNamingStrategy Detail:
 public  void afterPropertiesSet() 
 public ObjectName getObjectName(Object managedBean,
    String beanKey) throws MalformedObjectNameException 
    Reads the ObjectName from the source-level metadata associated with the managed resource's Class.
 public  void setAttributeSource(JmxAttributeSource attributeSource) 
    Set the implementation of the JmxAttributeSource interface to use when reading the source-level metadata.
 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.