public final class ValueReturnDelegate extends AbstractReturnDelegate
ReturnDelegate which allows setting the response value into the Message that will continue
through the pipeline.AbstractReturnDelegate.ConnectedInputStreamWrappermuleContext| Constructor and Description |
|---|
ValueReturnDelegate(org.mule.runtime.api.meta.model.ComponentModel componentModel,
CursorProviderFactory cursorProviderFactory,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
CoreEvent |
asReturnValue(Object value,
ExecutionContextAdapter operationContext)
If the
value is a Message, then a new one is created merging the contents of the returned value with the ones
of the input message. |
resolveMediaType, toMessagepublic ValueReturnDelegate(org.mule.runtime.api.meta.model.ComponentModel componentModel,
CursorProviderFactory cursorProviderFactory,
MuleContext muleContext)
public CoreEvent asReturnValue(Object value, ExecutionContextAdapter operationContext)
value is a Message, then a new one is created merging the contents of the returned value with the ones
of the input message. The merging criteria is as follows:
value's payload and DataType is set on the output message
value has a not null output for Message.getAttributes(), then that value is set on the
outbound message. Otherwise, whatever value the input message had is maintained
If the value is of any other type, then it's set as the payload of the outgoing message Adapts the value into an CoreEvent
value - the value to be returnedoperationContext - the ExecutionContextAdapter on which the operation was executedCoreEvent carrying the operation's resultCopyright © 2003–2025 MuleSoft, Inc.. All rights reserved.