public abstract class MessageUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_TYPE
Value for 'message-type' typically use as header key.
|
static String |
SOURCE_TYPE
Value for 'target-protocol' typically use as header key.
|
static String |
TARGET_PROTOCOL
Value for 'target-protocol' typically use as header key.
|
| Constructor and Description |
|---|
MessageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
create(Object handler,
Object payload,
Map<String,Object> headers)
Create a message for the handler.
|
static org.springframework.messaging.Message<?> |
unpack(Object handler,
Object message)
Convert a message from the handler into one that is safe to consume in the caller's
class loader.
|
public static String MESSAGE_TYPE
public static String TARGET_PROTOCOL
public static String SOURCE_TYPE
public static Object create(Object handler, Object payload, Map<String,Object> headers)
Message class must be on the classpath of the target
class loader).handler - the function that will be applied to the messagepayload - the payload of the messageheaders - the headers for the messagepublic static org.springframework.messaging.Message<?> unpack(Object handler, Object message)
Message class must be on the classpath of the target class loader).handler - the function that generated the messagemessage - the message to convertCopyright © 2021 Pivotal Software, Inc.. All rights reserved.