Class AnnotationMBeanExporter
- java.lang.Object
- org.springframework.jmx.support.MBeanRegistrationSupport
- org.springframework.jmx.export.MBeanExporter
- org.springframework.jmx.export.annotation.AnnotationMBeanExporter
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,InitializingBean,SmartInitializingSingleton,MBeanExportOperations
public class AnnotationMBeanExporter extends MBeanExporter
Convenient subclass of Spring's standardMBeanExporter, activating Java 5 annotation usage for JMX exposure of Spring beans:ManagedResource,ManagedAttribute,ManagedOperation, etc.Sets a
MetadataNamingStrategyand aMetadataMBeanInfoAssemblerwith anAnnotationJmxAttributeSource, and activates theMBeanExporter.AUTODETECT_ALLmode by default.- Since:
- 2.5
- Author:
- Juergen Hoeller
Field Summary
Fields inherited from class org.springframework.jmx.export.MBeanExporter
AUTODETECT_ALL, AUTODETECT_ASSEMBLER, AUTODETECT_MBEAN, AUTODETECT_NONE
Fields inherited from class org.springframework.jmx.support.MBeanRegistrationSupport
logger, REGISTRATION_FAIL_ON_EXISTING, REGISTRATION_IGNORE_EXISTING, REGISTRATION_REPLACE_EXISTING, server
Constructor Summary
Constructors Constructor Description AnnotationMBeanExporter()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetBeanFactory(BeanFactory beanFactory)voidsetDefaultDomain(String defaultDomain)Specify the default domain to be used for generating ObjectNames when no source-level metadata has been specified.Methods inherited from class org.springframework.jmx.export.MBeanExporter
adaptMBeanIfPossible, addExcludedBean, afterPropertiesSet, afterSingletonsInstantiated, createAndConfigureMBean, createModelMBean, destroy, getObjectName, isBeanDefinitionLazyInit, isMBean, onRegister, onUnregister, registerBeanNameOrInstance, registerBeans, registerManagedResource, registerManagedResource, setAllowEagerInit, setAssembler, setAutodetect, setAutodetectMode, setAutodetectModeName, setBeanClassLoader, setBeans, setEnsureUniqueRuntimeObjectNames, setExcludedBeans, setExposeManagedResourceClassLoader, setListeners, setNamingStrategy, setNotificationListenerMappings, setNotificationListeners, unregisterManagedResource
Methods inherited from class org.springframework.jmx.support.MBeanRegistrationSupport
doRegister, doUnregister, getRegisteredObjectNames, getServer, onRegister, setRegistrationBehavior, setRegistrationBehaviorName, setRegistrationPolicy, setServer, unregisterBeans
Constructor Detail
AnnotationMBeanExporter
public AnnotationMBeanExporter()
Method Detail
setDefaultDomain
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.
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
Description copied from class:MBeanExporterThis callback is only required for resolution of bean names in the"beans"Mapand for autodetection of MBeans (in the latter case, aListableBeanFactoryis required).- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Overrides:
setBeanFactoryin classMBeanExporter- Parameters:
beanFactory- owning BeanFactory (nevernull). The bean can immediately call methods on the factory.- See Also:
MBeanExporter.setBeans(java.util.Map<java.lang.String, java.lang.Object>),MBeanExporter.setAutodetect(boolean)