public abstract class AbstractReturnDelegate extends Object implements ReturnDelegate
ReturnDelegate implementations.
Contains the logic for taking an operation's output value and turn it into a Message which not only contains the
updated payload but also the proper DataType and attributes.
It also consider the case in which the value is a List<Result> which should be turned into a List<Message>. For
any of this cases, it also allows specifying a CursorProviderFactory which will transform the streaming payload values
into CursorProvider instances. As said before, this is also applied then the value is a message or list of them
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractReturnDelegate.ConnectedInputStreamWrapper |
| Modifier and Type | Field and Description |
|---|---|
protected MuleContext |
muleContext |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReturnDelegate(org.mule.runtime.api.meta.model.ComponentModel componentModel,
CursorProviderFactory cursorProviderFactory,
MuleContext muleContext)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.runtime.api.metadata.MediaType |
resolveMediaType(Object value,
org.mule.runtime.api.metadata.MediaType contextMimeType,
Charset contextEncoding)
If provided, mimeType and encoding configured as operation parameters will take precedence over what comes with the message's
DataType. |
protected org.mule.runtime.api.message.Message |
toMessage(Object value,
ExecutionContextAdapter operationContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasReturnValueprotected final MuleContext muleContext
protected AbstractReturnDelegate(org.mule.runtime.api.meta.model.ComponentModel componentModel,
CursorProviderFactory cursorProviderFactory,
MuleContext muleContext)
componentModel - the component which produces the return valuecursorProviderFactory - the CursorProviderFactory to use when a message is doing cursor based streaming. Can be
nullmuleContext - the MuleContext of the owning applicationprotected org.mule.runtime.api.message.Message toMessage(Object value, ExecutionContextAdapter operationContext)
protected org.mule.runtime.api.metadata.MediaType resolveMediaType(Object value, org.mule.runtime.api.metadata.MediaType contextMimeType, Charset contextEncoding)
DataType.value - the operation's valuecontextMimeType - the mimeType specified in the operationcontextEncoding - the encoding specified in the operationMediaTypeCopyright © 2003–2025 MuleSoft, Inc.. All rights reserved.