Output - the generic type of the output valueA - the generic type of the message attributespublic interface OperationResult<Output,A extends org.mule.runtime.api.message.Attributes>
MediaType.
The getOutput() value is always taken at face value, meaning that
if it's null, then the value that the operation returns to the runtime
will in fact be . However, if the getAttributes() or
getMediaType() are Optional.empty(), then the runtime will interpret
that as the operation not interested in setting those values, keeping the input message's
attributes and/or media type untouched.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
OperationResult.Builder<Output,A extends org.mule.runtime.api.message.Attributes>
Builds instances of
OperationResult |
| Modifier and Type | Method and Description |
|---|---|
static <Output,A extends org.mule.runtime.api.message.Attributes> |
builder()
Creates a new
OperationResult.Builder |
static <Output,A extends org.mule.runtime.api.message.Attributes> |
builder(org.mule.runtime.api.message.Message muleMessage)
Creates a new
OperationResult.Builder initialises with a state that matched
the one of the given muleMessage |
Optional<A> |
getAttributes()
The new value that the operation wants to set on
Message.getAttributes(). |
Optional<org.mule.runtime.api.metadata.MediaType> |
getMediaType()
The new
MediaType that the operation wants to set on Message#getDataType(). |
Output |
getOutput() |
static <Output,A extends org.mule.runtime.api.message.Attributes> OperationResult.Builder<Output,A> builder()
OperationResult.BuilderOutput - the generic type of the output valueA - the generic type of the message attributesOperationResult.Builderstatic <Output,A extends org.mule.runtime.api.message.Attributes> OperationResult.Builder<Output,A> builder(org.mule.runtime.api.message.Message muleMessage)
OperationResult.Builder initialises with a state that matched
the one of the given muleMessageOutput - the generic type of the output valueA - the generic type of the message attributesmuleMessage - a reference MessageOperationResult.BuilderOutput getOutput()
Optional<A> getAttributes()
Message.getAttributes().
The operation might not be interested in changing that value, in which case
this method would return Optional.empty()
Optional Attributes valueOptional<org.mule.runtime.api.metadata.MediaType> getMediaType()
MediaType that the operation wants to set on Message#getDataType().
The operation might not be interested in changing that value, in which case
this method would return Optional.empty()
Optional MediaType valueCopyright © 2016 MuleSoft, Inc.. All rights reserved.