Class MessageValues
- java.lang.Object
-
- org.springframework.cloud.stream.binder.MessageValues
-
-
Constructor Summary
Constructors Constructor Description MessageValues(Object payload, Map<String,Object> headers)MessageValues(org.springframework.messaging.Message<?> message)Create an instance from aMessage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)voidcopyHeadersIfAbsent(Map<String,Object> headersToCopy)Set<Map.Entry<String,Object>>entrySet()Objectget(Object key)Map<String,Object>getHeaders()ObjectgetPayload()booleanisEmpty()Set<String>keySet()Objectput(String key, Object value)voidputAll(Map<? extends String,?> m)Objectremove(Object key)voidsetPayload(Object payload)Set the payload.intsize()org.springframework.messaging.Message<?>toMessage()Convert to aMessageusing a the defaultMessageBuilder.org.springframework.messaging.Message<?>toMessage(org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory)Convert to aMessageusing aMessageBuilderFactory.Collection<Object>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
-
-
-
-
Method Detail
-
getPayload
public Object getPayload()
- Returns:
- the payload
-
setPayload
public void setPayload(Object payload)
Set the payload.- Parameters:
payload- any non null object.
-
toMessage
public org.springframework.messaging.Message<?> toMessage(org.springframework.integration.support.MessageBuilderFactory messageBuilderFactory)
Convert to aMessageusing aMessageBuilderFactory.- Parameters:
messageBuilderFactory- the MessageBuilderFactory- Returns:
- the Message
-
toMessage
public org.springframework.messaging.Message<?> toMessage()
Convert to aMessageusing a the defaultMessageBuilder.- Returns:
- the Message
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<String,Object>
-
-