org.springframework.jmx.export.naming
Class MetadataNamingStrategy

java.lang.Object
  extended by org.springframework.jmx.export.naming.MetadataNamingStrategy
All Implemented Interfaces:
ObjectNamingStrategy

public class MetadataNamingStrategy
extends Object
implements ObjectNamingStrategy

An implementation of the ObjectNamingStrategy interface that reads the ObjectName from the source-level metadata.

Since:
1.2
Author:
Rob Harrop
See Also:
ObjectNamingStrategy

Constructor Summary
MetadataNamingStrategy()
           
 
Method Summary
 ObjectName getObjectName(Object managedBean, String beanKey)
          Reads the ObjectName from the source level metadata associated with the managed resource's Class.
 void setAttributeSource(JmxAttributeSource attributeSource)
          Set the implementation of the JmxAttributeSource interface to use when reading the source level metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataNamingStrategy

public MetadataNamingStrategy()
Method Detail

setAttributeSource

public void setAttributeSource(JmxAttributeSource attributeSource)
Set the implementation of the JmxAttributeSource interface to use when reading the source level metadata.


getObjectName

public ObjectName getObjectName(Object managedBean,
                                String beanKey)
                         throws 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:
MalformedObjectNameException - if the resulting ObjectName is invalid


Copyright (c) 2002-2007 The Spring Framework Project.