Example usage for org.springframework.integration.support.context NamedComponent getComponentName

List of usage examples for org.springframework.integration.support.context NamedComponent getComponentName

Introduction

In this page you can find the example usage for org.springframework.integration.support.context NamedComponent getComponentName.

Prototype

String getComponentName();

Source Link

Usage

From source file:org.springframework.integration.history.MessageHistory.java

private static Properties extractMetadata(NamedComponent component) {
    Entry entry = new Entry();
    String name = component.getComponentName();
    String type = component.getComponentType();
    if (name != null && !name.startsWith("org.springframework.integration")) {
        entry.setName(name);//from   w  w w  .j  a v  a 2  s.co  m
        if (type != null) {
            entry.setType(type);
        }
    }
    if (!entry.isEmpty()) {
        entry.setTimestamp(Long.toString(System.currentTimeMillis()));
    }
    return entry;
}