Class MessageValues
java.lang.Object
org.springframework.cloud.stream.binder.MessageValues
A mutable type for allowing
Binder
implementations to transform and enrich
message content more efficiently.- Author:
- David Turanski, Marius Bogoevici
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMessageValues
(Object payload, Map<String, Object> headers) MessageValues
(org.springframework.messaging.Message<?> message) Create an instance from aMessage
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) void
copyHeadersIfAbsent
(Map<String, Object> headersToCopy) entrySet()
boolean
isEmpty()
keySet()
void
void
setPayload
(Object payload) Set the payload.int
size()
org.springframework.messaging.Message<?>
Convert to aMessage
using a the defaultMessageBuilder
.org.springframework.messaging.Message<?>
toMessage
(org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory) Convert to aMessage
using aMessageBuilderFactory
.values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MessageValues
public MessageValues(org.springframework.messaging.Message<?> message) Create an instance from aMessage
.- Parameters:
message
- the message
-
MessageValues
-
-
Method Details
-
getPayload
- Returns:
- the payload
-
setPayload
Set the payload.- Parameters:
payload
- any non null object.
-
getHeaders
-
toMessage
public org.springframework.messaging.Message<?> toMessage(org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory) Convert to aMessage
using aMessageBuilderFactory
.- Parameters:
messageBuilderFactory
- the MessageBuilderFactory- Returns:
- the Message
-
toMessage
public org.springframework.messaging.Message<?> toMessage()Convert to aMessage
using a the defaultMessageBuilder
.- Returns:
- the Message
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<String,
Object>
-
containsValue
- Specified by:
containsValue
in interfaceMap<String,
Object>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
copyHeadersIfAbsent
-