public class MessageValues
extends java.lang.Object
implements java.util.Map<java.lang.String,java.lang.Object>
MessageBus
implementations to transform and enrich message content more
efficiently.Constructor and Description |
---|
MessageValues(org.springframework.messaging.Message<?> message)
Create an instance from a
Message . |
MessageValues(java.lang.Object payload,
java.util.Map<java.lang.String,java.lang.Object> headers) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
void |
copyHeadersIfAbsent(java.util.Map<java.lang.String,java.lang.Object> headersToCopy) |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
entrySet() |
java.lang.Object |
get(java.lang.Object key) |
java.lang.Object |
getPayload() |
boolean |
isEmpty() |
java.util.Set<java.lang.String> |
keySet() |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value) |
void |
putAll(java.util.Map<? extends java.lang.String,?> m) |
java.lang.Object |
remove(java.lang.Object key) |
void |
setPayload(java.lang.Object payload)
Set the payload
|
int |
size() |
org.springframework.messaging.Message<?> |
toMessage()
Convert to a
Message using a the default MessageBuilder . |
org.springframework.messaging.Message<?> |
toMessage(org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory)
Convert to a
Message using a MessageBuilderFactory . |
java.util.Collection<java.lang.Object> |
values() |
public MessageValues(org.springframework.messaging.Message<?> message)
Message
.message
- the messagepublic MessageValues(java.lang.Object payload, java.util.Map<java.lang.String,java.lang.Object> headers)
public java.lang.Object getPayload()
public org.springframework.messaging.Message<?> toMessage(org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory)
Message
using a MessageBuilderFactory
.messageBuilderFactory
- the MessageBuilderFactorypublic org.springframework.messaging.Message<?> toMessage()
Message
using a the default MessageBuilder
.public void setPayload(java.lang.Object payload)
payload
- any non null object.public int size()
size
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.String,java.lang.Object>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object put(java.lang.String key, java.lang.Object value)
put
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.String,java.lang.Object>
public void putAll(java.util.Map<? extends java.lang.String,?> m)
putAll
in interface java.util.Map<java.lang.String,java.lang.Object>
public void clear()
clear
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Set<java.lang.String> keySet()
keySet
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Collection<java.lang.Object> values()
values
in interface java.util.Map<java.lang.String,java.lang.Object>
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map<java.lang.String,java.lang.Object>
public void copyHeadersIfAbsent(java.util.Map<java.lang.String,java.lang.Object> headersToCopy)