public class DelegateToFlowTransformer extends Object
SourceCallback.
This class facilitates asynchronous interaction between the embedded mock HTTP server and the flow under test. It allows the
HTTP request body to be sent into the flow, and a HTTPMockServerResponse to be returned once the flow completes.
The flow completes by invoking HTTPMockServerEndpointSource.completeResponse(org.mule.test.extensions.http.mock.internal.server.HTTPMockServerResponse, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext), which retrieves and completes the
CompletableFuture that was added to the SourceCallbackContext by this transformer.
In the event of flow failure or interruption, a generic 500 Internal Server Error response is returned instead.
| Modifier and Type | Field and Description |
|---|---|
static String |
RESPONSE_FUTURE_PARAMETER |
| Modifier and Type | Method and Description |
|---|---|
static HTTPMockServerResponse |
delegate(org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream,HTTPMockRequestAttributes> callback,
byte[] requestBody) |
public static final String RESPONSE_FUTURE_PARAMETER
public static HTTPMockServerResponse delegate(org.mule.runtime.extension.api.runtime.source.SourceCallback<InputStream,HTTPMockRequestAttributes> callback, byte[] requestBody)
Copyright © 2025 MuleSoft, Inc.. All rights reserved.