Example usage for org.springframework.integration.stomp.support IntegrationStompHeaders HEADERS

List of usage examples for org.springframework.integration.stomp.support IntegrationStompHeaders HEADERS

Introduction

In this page you can find the example usage for org.springframework.integration.stomp.support IntegrationStompHeaders HEADERS.

Prototype

Collection HEADERS

To view the source code for org.springframework.integration.stomp.support IntegrationStompHeaders HEADERS.

Click Source Link

Usage

From source file:org.springframework.integration.stomp.support.StompHeaderMapper.java

@Override
public Map<String, Object> toHeaders(StompHeaders source) {
    Map<String, Object> target = new HashMap<String, Object>();
    for (String name : source.keySet()) {
        if (shouldMapHeader(name, this.inboundHeaderNames)) {
            if (StompHeaders.CONTENT_TYPE.equals(name)) {
                target.put(MessageHeaders.CONTENT_TYPE, source.getContentType());
            } else {
                String key = name;
                if (IntegrationStompHeaders.HEADERS.contains(name)) {
                    key = IntegrationStompHeaders.PREFIX + name;
                }//w w w. ja v  a 2  s .c om
                target.put(key, source.getFirst(name));
            }
        }
    }
    return target;
}