MessageHelper

Members

Static functions

createMessage
MessageBase createMessage(Object payload, MessageHeaders messageHeaders)

A shortcut factory method for creating a message with the given payload and {@code MessageHeaders}. <p><strong>Note:</strong> the given {@code MessageHeaders} instance is used directly in the new message, i.e. it is not copied. @param payload the payload to use (never {@code null}) @param messageHeaders the headers to use (never {@code null}) @return the created message @since 4.1

createMessage
Message!(T) createMessage(T payload, MessageHeaders messageHeaders)
Undocumented in source. Be warned that the author may not have intended to support it.
fromMessage
MessageBuilder!(T) fromMessage(Message!(T) message)

Create a builder for a new {@link Message} instance pre-populated with all of the headers copied from the provided message. The payload of the provided Message will also be used as the payload for the new message. @param message the Message from which the payload and all headers will be copied

withPayload
MessageBuilder!(T) withPayload(T payload)

Create a new builder for a message with the given payload. @param payload the payload

Meta