Class MessageUtils
java.lang.Object
org.springframework.cloud.function.context.message.MessageUtils
- Author:
- Dave Syer, Oleg Zhurakousky
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
!!! INTERNAL USE ONLY, MAY CHANGE OR REMOVED WITHOUT NOTICE!!! -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
<<<<<<< HEAD Create a message for the handler.toCaseInsensitiveHeadersStructure
(org.springframework.messaging.Message<?> message) Returns (payload, headers) structure identical to `message` while substituting headers with case insensitive map.static org.springframework.messaging.Message<?>
Convert a message from the handler into one that is safe to consume in the caller's class loader.
-
Field Details
-
MESSAGE_TYPE
Value for 'message-type' typically use as header key. -
TARGET_PROTOCOL
Value for 'target-protocol' typically use as header key. -
SOURCE_TYPE
Value for 'target-protocol' typically use as header key.
-
-
Constructor Details
-
MessageUtils
public MessageUtils()
-
-
Method Details
-
create
<<<<<<< HEAD Create a message for the handler. If the handler is a wrapper for a function in an isolated class loader, then the message will be created with the target class loader (therefore theMessage
class must be on the classpath of the target class loader).- Parameters:
handler
- the function that will be applied to the messagepayload
- the payload of the messageheaders
- the headers for the message- Returns:
- a message with the correct class loader
-
unpack
Convert a message from the handler into one that is safe to consume in the caller's class loader. If the handler is a wrapper for a function in an isolated class loader, then the message will be created with the target class loader (therefore theMessage
class must be on the classpath of the target class loader).- Parameters:
handler
- the function that generated the messagemessage
- the message to convert- Returns:
- a message with the correct class loader
-
toCaseInsensitiveHeadersStructure
public static MessageUtils.MessageStructureWithCaseInsensitiveHeaderKeys toCaseInsensitiveHeadersStructure(org.springframework.messaging.Message<?> message) Returns (payload, headers) structure identical to `message` while substituting headers with case insensitive map.
-