org.springframework.jmx.export.annotation
Class AnnotationMBeanExporter

java.lang.Object
  extended by org.springframework.jmx.support.MBeanRegistrationSupport
      extended by org.springframework.jmx.export.MBeanExporter
          extended by org.springframework.jmx.export.annotation.AnnotationMBeanExporter
All Implemented Interfaces:
BeanClassLoaderAware, BeanFactoryAware, DisposableBean, InitializingBean, MBeanExportOperations

public class AnnotationMBeanExporter
extends MBeanExporter

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

Sets a MetadataNamingStrategy and a MetadataMBeanInfoAssembler with an AnnotationJmxAttributeSource, and activates the MBeanExporter.AUTODETECT_ALL mode 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, registeredBeans, REGISTRATION_FAIL_ON_EXISTING, REGISTRATION_IGNORE_EXISTING, REGISTRATION_REPLACE_EXISTING, server
 
Constructor Summary
AnnotationMBeanExporter()
           
 
Method Summary
 void setDefaultDomain(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, afterPropertiesSet, createAndConfigureMBean, createModelMBean, destroy, getObjectName, isBeanDefinitionLazyInit, isMBean, onRegister, onUnregister, registerBeanNameOrInstance, registerBeans, registerManagedResource, registerManagedResource, setAllowEagerInit, setAssembler, setAutodetect, setAutodetectMode, setAutodetectModeName, setBeanClassLoader, setBeanFactory, 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, setServer, unregisterBeans
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

See Also:
MetadataNamingStrategy.setDefaultDomain(java.lang.String)