- Type Parameters:
T- the generic type of the output valueA- the generic type of the 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 null. 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.
- Since:
- 1.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,A> Result.Builder<T, A> builder()Creates a newResult.Builderstatic <T,A> Result.Builder<T, A> builder(org.mule.runtime.api.message.Message muleMessage) Creates a newResult.Builderinitialises with a state that matched the one of the givenmuleMessagecopy()Creates a newResult.Builderinitialises with a state that matchedthisresultThe new value that the operation wants to set onMessage.getAttributes().Optional<org.mule.runtime.api.metadata.MediaType>The newMediaTypethat the operation wants to set onMessageattributes.The length of the payload in bytes if known.Optional<org.mule.runtime.api.metadata.MediaType>The newMediaTypethat the operation wants to set onMessagepayload.
-
Constructor Details
-
Result
protected Result()
-
-
Method Details
-
builder
Creates a newResult.Builder- Type Parameters:
T- the generic type of the output valueA- the generic type of the message attributes- Returns:
- a new
Result.Builder
-
builder
Creates a newResult.Builderinitialises with a state that matched the one of the givenmuleMessage- Type Parameters:
T- the generic type of the output valueA- the generic type of the message attributes- Parameters:
muleMessage- a referenceMessage- Returns:
- a new
Result.Builder
-
copy
Creates a newResult.Builderinitialises with a state that matchedthisresult- Returns:
- a new
Result.Builder
-
getOutput
- Returns:
- The operation's output
-
getAttributes
The new value that the operation wants to set onMessage.getAttributes().The operation might not be interested in changing that value, in which case this method would return
Optional.empty()- Returns:
- an
OptionalAttributesvalue
-
getMediaType
The newMediaTypethat the operation wants to set onMessagepayload.The operation might not be interested in changing that value, in which case this method would return
Optional.empty()- Returns:
- an
OptionalMediaTypevalue
-
getByteLength
The length of the payload in bytes if known.- Returns:
- an
Optionalpayload length
-
getAttributesMediaType
The newMediaTypethat the operation wants to set onMessageattributes.The operation might not be interested in changing that value, in which case this method would return
Optional.empty()- Returns:
- an
OptionalMediaTypevalue
-