public interface Message extends Serializable
DataType) and
getAttributes() associated with the content.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Message.Builder
Handles the
Message's MediaType as well as its attributes creation, either from a provided TypedValue
or constructing it internally from a given value and MediaType. |
static interface |
Message.CollectionBuilder |
static interface |
Message.PayloadBuilder
Handles the
Message's payload creation, either from a provided TypedValue or constructing it internally from
a given value and MediaType. |
| Modifier and Type | Method and Description |
|---|---|
static Message.PayloadBuilder |
builder()
Provides a builder to create
Message objects. |
static Message.Builder |
builder(Message message)
|
<T> TypedValue<T> |
getAttributes()
Gets the attributes associated with the Message.
|
<T> TypedValue<T> |
getPayload()
Gets a
TypedValue with the payload of this message. |
static Message |
of(Object payload)
Create a new
instance with the given payload. |
static Message.PayloadBuilder builder()
Message objects.Message.Builder.static Message.Builder builder(Message message)
message - existing Message to use as a template to create a new Message.Builder instance.Message.Builder based on the template message provided.<T> TypedValue<T> getPayload()
TypedValue with the payload of this message.T - the type of the payload.<T> TypedValue<T> getAttributes()
Attributes attributes object is specific to the connector that
was the source of the current message and is used for obtaining message properties or headers if applicable plus additional
information that provides context for the current message such as file size, file name and last modified date for FILE, and
origin IP address, query parameters etc. for HTTP.
If there are no attributes associated with the current message, for example if the source of the message was not a connector, then the attributes with be null.
Copyright © 2017 MuleSoft, Inc.. All rights reserved.