public static interface Message.PayloadBuilder
| Modifier and Type | Method and Description |
|---|---|
Message.Builder |
collectionPayload(Collection value,
Class<?> itemType)
Sets the collection value for the
Message's payload to be built. |
Message.Builder |
collectionPayload(Object[] value)
Sets the collection value for the
Message's payload to be built. |
Message.Builder |
mediaType(MediaType mediaType)
|
Message.Builder |
nullPayload()
Sets a
#null value for the Message's payload to be built. |
Message.Builder |
payload(Object value)
Sets the value for the
Message's payload to be built. |
Message.Builder |
streamPayload(Iterator value,
Class<?> itemType)
Sets the consumable streaming collection value for the
Message's payload to be built. |
Message.Builder nullPayload()
#null value for the Message's payload to be built.Message.Builder payload(Object value)
Message's payload to be built.
If a DataType has previously been set it's type will be updated to reflect the type of the new
content class while preserving it's MediaType, unless the new content type defines it's own
MediaType in which case this will be used instead. See
DataTypeBuilder.fromObject(Object)
value - the message contentMessage.Builder mediaType(MediaType mediaType)
mediaType - the mediaType to setNullPointerException - if the mediaType is nullMessage.Builder streamPayload(Iterator value, Class<?> itemType)
Message's payload to be built.
If a DataType has previously been set it's type will be updated to reflect the type of the new
content class while preserving it's MediaType, unless the new value type defines it's own
MediaType in which case this will be used instead. See
DataTypeBuilder.fromObject(Object).
If you already have a Collection instance, use collectionPayload(Collection, Class) instead.
value - the iterator for the collection contentitemType - the collection item typeNullPointerException - if the payload is nullMessage.Builder collectionPayload(Collection value, Class<?> itemType)
Message's payload to be built.
If a DataType has previously been set it's type will be updated to reflect the type of the new
content class while preserving it's MediaType, unless the new value type defines it's own
MediaType in which case this will be used instead. See
DataTypeBuilder.fromObject(Object)
value - the collection contentitemType - the collection item typeNullPointerException - if the content is nullMessage.Builder collectionPayload(Object[] value)
Message's payload to be built.
If a DataType has previously been set it's type will be updated to reflect the type of the new
content class while preserving it's MediaType, unless the new value type defines it's own
MediaType in which case this will be used instead. See
DataTypeBuilder.fromObject(Object)
value - the array to use as a collection contentNullPointerException - if the content is nullCopyright © 2017 MuleSoft, Inc.. All rights reserved.