@Configuration public class MBeanExportConfiguration extends java.lang.Object implements ImportAware, EnvironmentAware, BeanFactoryAware
@Configuration
class that registers a AnnotationMBeanExporter
bean.
This configuration class is automatically imported when using the
EnableMBeanExport
annotation. See its javadoc for complete usage details.
EnableMBeanExport
Modifier and Type | Class and Description |
---|---|
static class |
MBeanExportConfiguration.SpecificPlatform |
Constructor and Description |
---|
MBeanExportConfiguration() |
Modifier and Type | Method and Description |
---|---|
AnnotationMBeanExporter |
mbeanExporter() |
void |
setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.
|
void |
setEnvironment(Environment environment)
Set the
Environment that this object runs in. |
void |
setImportMetadata(AnnotationMetadata importMetadata)
Set the annotation metadata of the importing @
Configuration class. |
public void setImportMetadata(AnnotationMetadata importMetadata)
ImportAware
Configuration
class.setImportMetadata
in interface ImportAware
public void setEnvironment(Environment environment)
EnvironmentAware
Environment
that this object runs in.setEnvironment
in interface EnvironmentAware
public void setBeanFactory(BeanFactory beanFactory)
BeanFactoryAware
Invoked after the population of normal bean properties
but before an initialization callback such as
InitializingBean.afterPropertiesSet()
or a custom init-method.
setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (never null
).
The bean can immediately call methods on the factory.BeanInitializationException
@Bean(name="mbeanExporter") @Role(value=2) public AnnotationMBeanExporter mbeanExporter()