|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.jmx.export.naming.MetadataNamingStrategy
public class MetadataNamingStrategy
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 Spring.
ObjectNamingStrategy,
AnnotationJmxAttributeSource| Constructor Summary | |
|---|---|
MetadataNamingStrategy()
Create a new MetadataNamingStrategy |
|
MetadataNamingStrategy(JmxAttributeSource attributeSource)
Create a new MetadataNamingStrategy |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
javax.management.ObjectName |
getObjectName(java.lang.Object managedBean,
java.lang.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. |
void |
setDefaultDomain(java.lang.String defaultDomain)
Specify the default domain to be used for generating ObjectNames when no source-level metadata has been specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetadataNamingStrategy()
MetadataNamingStrategy which needs to be
configured through the setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource) method.
public MetadataNamingStrategy(JmxAttributeSource attributeSource)
MetadataNamingStrategy for the given
JmxAttributeSource.
- Parameters:
attributeSource - the JmxAttributeSource to use
| Method Detail |
|---|
public void setAttributeSource(JmxAttributeSource attributeSource)
JmxAttributeSource interface to use
when reading the source-level metadata.
public void setDefaultDomain(java.lang.String defaultDomain)
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.
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
public javax.management.ObjectName getObjectName(java.lang.Object managedBean,
java.lang.String beanKey)
throws javax.management.MalformedObjectNameException
ObjectName from the source-level metadata associated
with the managed resource's Class.
getObjectName in interface ObjectNamingStrategymanagedBean - the bean that will be exposed under the
returned ObjectNamebeanKey - the key associated with this bean in the beans map
passed to the MBeanExporter
ObjectName instance
javax.management.MalformedObjectNameException - if the resulting ObjectName is invalid
|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||