Example usage for org.springframework.jmx.export.assembler MetadataMBeanInfoAssembler setAttributeSource

List of usage examples for org.springframework.jmx.export.assembler MetadataMBeanInfoAssembler setAttributeSource

Introduction

In this page you can find the example usage for org.springframework.jmx.export.assembler MetadataMBeanInfoAssembler setAttributeSource.

Prototype

public void setAttributeSource(JmxAttributeSource attributeSource) 

Source Link

Document

Set the JmxAttributeSource implementation to use for reading the metadata from the bean class.

Usage

From source file:ru.trett.cis.config.Beans.java

@Bean
public MetadataMBeanInfoAssembler assembler() {
    MetadataMBeanInfoAssembler assembler = new MetadataMBeanInfoAssembler();
    assembler.setAttributeSource(attributeSource());
    return assembler;
}

From source file:com.predic8.membrane.core.jmx.JmxExporter.java

@Override
public void start() {
    exporter = new MBeanExporter();
    exporter.setRegistrationPolicy(RegistrationPolicy.IGNORE_EXISTING);
    MetadataMBeanInfoAssembler assembler = new MetadataMBeanInfoAssembler();
    assembler.setAttributeSource(new AnnotationJmxAttributeSource());
    assembler.afterPropertiesSet();//  www .  j a  v a2  s  .co  m
    exporter.setAssembler(assembler);
}