Example usage for org.springframework.messaging.simp.stomp StompHeaders keySet

List of usage examples for org.springframework.messaging.simp.stomp StompHeaders keySet

Introduction

In this page you can find the example usage for org.springframework.messaging.simp.stomp StompHeaders keySet.

Prototype

@Override
    public Set<String> keySet() 

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;
                }//from   w  w w . j a v  a2 s. c  om
                target.put(key, source.getFirst(name));
            }
        }
    }
    return target;
}