Class MBeanExportConfiguration
- java.lang.Object
- org.springframework.context.annotation.MBeanExportConfiguration
- All Implemented Interfaces:
Aware,BeanFactoryAware,ImportAware,EnvironmentAware
@Configuration @Role(2) public class MBeanExportConfiguration extends Object implements ImportAware, EnvironmentAware, BeanFactoryAware
@Configurationclass that registers aAnnotationMBeanExporterbean.This configuration class is automatically imported when using the
EnableMBeanExportannotation. See its javadoc for complete usage details.- Since:
- 3.2
- Author:
- Phillip Webb, Chris Beams
- See Also:
EnableMBeanExport
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMBeanExportConfiguration.SpecificPlatformSpecific platforms that might need custom MBean handling.
Constructor Summary
Constructors Constructor Description MBeanExportConfiguration()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationMBeanExportermbeanExporter()voidsetBeanFactory(BeanFactory beanFactory)Callback that supplies the owning factory to a bean instance.voidsetEnvironment(Environment environment)Set theEnvironmentthat this component runs in.voidsetImportMetadata(AnnotationMetadata importMetadata)Set the annotation metadata of the importing @Configurationclass.
Constructor Detail
MBeanExportConfiguration
public MBeanExportConfiguration()
Method Detail
setImportMetadata
public void setImportMetadata(AnnotationMetadata importMetadata)
Description copied from interface:ImportAwareSet the annotation metadata of the importing @Configurationclass.- Specified by:
setImportMetadatain interfaceImportAware
setEnvironment
public void setEnvironment(Environment environment)
Description copied from interface:EnvironmentAwareSet theEnvironmentthat this component runs in.- Specified by:
setEnvironmentin interfaceEnvironmentAware
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
Description copied from interface:BeanFactoryAwareCallback that supplies the owning factory to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean.afterPropertiesSet()or a custom init-method.- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Parameters:
beanFactory- owning BeanFactory (nevernull). The bean can immediately call methods on the factory.- See Also:
BeanInitializationException
mbeanExporter
@Bean(name="mbeanExporter") @Role(2) public AnnotationMBeanExporter mbeanExporter()