Top Description Fields Constructors Methods
org.springframework.jmx.export.annotation

public Class AnnotationMBeanExporter

extends MBeanExporter
Class Inheritance
Imports
org.springframework.beans.factory.BeanFactory, org.springframework.jmx.export.MBeanExporter, org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler, org.springframework.jmx.export.naming.MetadataNamingStrategy

Convenient subclass of Spring's standard MBeanExporter, activating annotation usage for JMX exposure of Spring beans: ManagedResource, ManagedAttribute, ManagedOperation, etc.

Sets a MetadataNamingStrategy and a MetadataMBeanInfoAssembler with an AnnotationJmxAttributeSource, and activates autodetection by default.

Author
Juergen Hoeller
Since
2.5
See Also
setAutodetect, AnnotationJmxAttributeSource

Field Summary

Modifier and TypeField and Description
private final AnnotationJmxAttributeSource
private final MetadataMBeanInfoAssembler
private final MetadataNamingStrategy
Inherited from org.springframework.jmx.export.MBeanExporter:
AUTODETECT_ALLAUTODETECT_ASSEMBLERAUTODETECT_MBEANAUTODETECT_NONE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
setBeanFactory(BeanFactory
owning BeanFactory (never null). The bean can immediately call methods on the factory.
beanFactory
)

Overrides org.springframework.jmx.export.MBeanExporter.setBeanFactory.

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

This callback is only required for resolution of bean names in the "beans" Map and for auto-detection of MBeans (in the latter case, a ListableBeanFactory is required).
public void
setDefaultDomain(String defaultDomain)

Specify the default domain to be used for generating ObjectNames when no source-level metadata has been specified.

Inherited from org.springframework.jmx.export.MBeanExporter:
adaptMBeanIfPossibleaddExcludedBeanafterPropertiesSetafterSingletonsInstantiatedcreateAndConfigureMBeancreateModelMBeandestroygetObjectNameisBeanDefinitionLazyInitisMBeanonRegisteronUnregisterregisterBeanNameOrInstanceregisterBeansregisterManagedResourceregisterManagedResourcesetAllowEagerInitsetAssemblersetAutodetectsetAutodetectModesetAutodetectModeNamesetBeanClassLoadersetBeanssetEnsureUniqueRuntimeObjectNamessetExcludedBeanssetExposeManagedResourceClassLoadersetListenerssetNamingStrategysetNotificationListenerMappingssetNotificationListenersunregisterManagedResource

Field Detail

annotationSourceback to summary
private final AnnotationJmxAttributeSource annotationSource
metadataAssemblerback to summary
private final MetadataMBeanInfoAssembler metadataAssembler
metadataNamingStrategyback to summary
private final MetadataNamingStrategy metadataNamingStrategy

Constructor Detail

AnnotationMBeanExporterback to summary
public AnnotationMBeanExporter()

Method Detail

setBeanFactoryback to summary
public void setBeanFactory(BeanFactory beanFactory)

Overrides org.springframework.jmx.export.MBeanExporter.setBeanFactory.

Implements org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

Doc from org.springframework.jmx.export.MBeanExporter.setBeanFactory.

This callback is only required for resolution of bean names in the "beans" Map and for auto-detection of MBeans (in the latter case, a ListableBeanFactory is required).

Parameters
beanFactory:BeanFactory

Doc from org.springframework.beans.factory.BeanFactoryAware.setBeanFactory.

owning BeanFactory (never null). The bean can immediately call methods on the factory.

Annotations
@Override
setDefaultDomainback to summary
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.

See Also
MetadataNamingStrategy#setDefaultDomain