public class DefaultMultiPartPayload extends Object implements Serializable, org.mule.runtime.api.message.MultiPartPayload
Message composed of many different parts. Each parts is in itself a Message, and has
attributes specific to that parts (such as the headers of a single http part).
This is useful for representing attachments as part of the payload of a message.
| Modifier and Type | Field and Description |
|---|---|
static PartAttributes |
BODY_ATTRIBUTES
A singleton attributes instance for parts that do not represent attachments.
|
| Constructor and Description |
|---|
DefaultMultiPartPayload(List<org.mule.runtime.api.message.Message> parts)
Builds a new
DefaultMultiPartPayload with the given Messages as parts. |
DefaultMultiPartPayload(org.mule.runtime.api.message.Message... parts)
Builds a new
DefaultMultiPartPayload with the given Messages as parts. |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.api.message.Message |
getBodyPart()
Looks up the part that represents the body (not an attachment) of the message.
|
Map<String,org.mule.runtime.api.message.Message> |
getNamedParts() |
List<org.mule.runtime.api.message.Message> |
getNonBodyParts()
Looks up the part that represents the body (not an attachment) of the message.
|
org.mule.runtime.api.message.Message |
getPart(String partName) |
List<String> |
getPartNames() |
List<org.mule.runtime.api.message.Message> |
getParts() |
boolean |
hasBodyPart()
Checks for the presence of the part that represents the body (not an attachment) of the message.
|
String |
toString() |
public static final PartAttributes BODY_ATTRIBUTES
public DefaultMultiPartPayload(org.mule.runtime.api.message.Message... parts)
DefaultMultiPartPayload with the given Messages as parts.parts - the contained parts.public DefaultMultiPartPayload(List<org.mule.runtime.api.message.Message> parts)
DefaultMultiPartPayload with the given Messages as parts.parts - the contained parts.public List<org.mule.runtime.api.message.Message> getParts()
getParts in interface org.mule.runtime.api.message.MultiPartPayloadpublic List<String> getPartNames()
getPartNames in interface org.mule.runtime.api.message.MultiPartPayloadpublic org.mule.runtime.api.message.Message getPart(String partName)
getPart in interface org.mule.runtime.api.message.MultiPartPayloadpublic Map<String,org.mule.runtime.api.message.Message> getNamedParts()
getNamedParts in interface org.mule.runtime.api.message.MultiPartPayloadpublic org.mule.runtime.api.message.Message getBodyPart()
public List<org.mule.runtime.api.message.Message> getNonBodyParts()
public boolean hasBodyPart()
true if the part for the body is present.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.