InputPayload - The type of payload to be pushed in the mule-flowInputAttr - The type of attributes to be pushed in the mule-flowOutput - The type returned by the mule-flow executionpublic abstract class ApikitSource<InputPayload,InputAttr,Output>
extends org.mule.runtime.extension.api.runtime.source.Source<InputPayload,InputAttr>
SourceExecutorRegistry discriminated by RoutingKey| Constructor and Description |
|---|
ApikitSource() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> org.mule.runtime.api.metadata.TypedValue<T> |
convert(org.mule.runtime.api.metadata.TypedValue<Object> payload,
org.mule.runtime.api.metadata.DataType dataType) |
protected void |
failure(Throwable error,
org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext,
org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
This method must be called by any failures generated by processing a response (@OnError handlers or errors during @OnSuccess)
|
protected abstract RoutingKey<InputPayload,InputAttr,Output> |
getKey() |
void |
onError(org.mule.runtime.api.message.Error error,
org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext,
org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
When mule-flow execution ends with an error, the result is completed with the Error
|
void |
onStart(org.mule.runtime.extension.api.runtime.source.SourceCallback<InputPayload,InputAttr> sourceCallback)
Creates a SourceExecutor to trigger the flow execution,and register the executor
in
SourceExecutorRegistry |
void |
onStop()
Unregister the executor from SourceExecutorRegistry
|
void |
onTerminate(org.mule.runtime.extension.api.runtime.source.SourceResult sourceResult)
When mule-flow execution terminates, check if an error occurred
|
protected void |
success(Output responseContent,
org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext,
org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
This method must be called by the @OnSuccess annotated method in the child class
|
protected abstract RoutingKey<InputPayload,InputAttr,Output> getKey()
protected void success(Output responseContent, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext, org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
responseContent - the content received from flow executioncallbackContext - completionCallback - protected void failure(Throwable error, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext, org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
error - the exception that caused the failure receivedcallbackContext - the callback context for the message that failed its processingcompletionCallback - the completion callback for the messagepublic void onStart(org.mule.runtime.extension.api.runtime.source.SourceCallback<InputPayload,InputAttr> sourceCallback)
SourceExecutorRegistryonStart in class org.mule.runtime.extension.api.runtime.source.Source<InputPayload,InputAttr>sourceCallback - provided by runtime to call the flowpublic void onStop()
onStop in class org.mule.runtime.extension.api.runtime.source.Source<InputPayload,InputAttr>@OnError
public void onError(org.mule.runtime.api.message.Error error,
org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext,
org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
error - callbackContext - completionCallback - @OnTerminate public void onTerminate(org.mule.runtime.extension.api.runtime.source.SourceResult sourceResult)
sourceResult - protected <T> org.mule.runtime.api.metadata.TypedValue<T> convert(org.mule.runtime.api.metadata.TypedValue<Object> payload, org.mule.runtime.api.metadata.DataType dataType)
Copyright © 2026 MuleSoft, Inc.. All rights reserved.