GenericMessage

An implementation of {@link Message} with a generic payload. Once created, a GenericMessage is immutable.

@author Mark Fisher @since 4.0 @param (T) the payload type @see MessageBuilder

Constructors

this
this(T payload)

Create a new message with the given payload. @param payload the message payload (never {@code null})

this
this(T payload, Map!(string, Object) headers)

Create a new message with the given payload and headers. The content of the given header map is copied. @param payload the message payload (never {@code null}) @param headers message headers to use for initialization

this
this(T payload, MessageHeaders headers)

A constructor with the {@link MessageHeaders} instance to use. <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 message payload (never {@code null}) @param headers message headers

Members

Functions

getHeaders
MessageHeaders getHeaders()
Undocumented in source. Be warned that the author may not have intended to support it.
getPayload
T getPayload()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Object other)
Undocumented in source. Be warned that the author may not have intended to support it.
payloadType
TypeInfo payloadType()
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta