Example usage for org.springframework.integration.core MessageSource getClass

List of usage examples for org.springframework.integration.core MessageSource getClass

Introduction

In this page you can find the example usage for org.springframework.integration.core MessageSource getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.springframework.integration.monitor.IntegrationMBeanExporter.java

private void registerSources() {
    for (SimpleMessageSourceMetrics source : sources) {
        MessageSourceMetrics monitor = enhanceSourceMonitor(source);
        String name = monitor.getName();
        this.allSourcesByName.put(name, monitor);
        if (!PatternMatchUtils.simpleMatch(this.componentNamePatterns, name)) {
            continue;
        }//  w w w  .ja  v a2s  . c  o  m
        // Only register once...
        if (!sourcesByName.containsKey(name)) {
            String beanKey = getSourceBeanKey(monitor);
            if (name != null) {
                sourcesByName.put(name, monitor);
            }
            registerBeanNameOrInstance(monitor, beanKey);
            // Expose the raw bean if it is managed
            MessageSource<?> bean = source.getMessageSource();
            if (assembler.includeBean(bean.getClass(), source.getName())) {
                registerBeanInstance(bean, this.getMonitoredIntegrationObjectBeanKey(bean, name));
            }
        }
    }
}