T - type of input content.A - type of input attributes.public abstract class BaseSource<T,A>
extends org.mule.runtime.extension.api.runtime.source.Source<T,A>
implements org.mule.runtime.api.lifecycle.Initialisable
| Modifier and Type | Field and Description |
|---|---|
protected ExpansionParameters |
expansionParameters |
protected org.mule.runtime.api.component.location.ComponentLocation |
location |
protected ODataConfig |
odataConfig |
protected String |
ROUTING_CONTEXT_KEY |
protected ConfigurationRoutingKey |
routingKey |
protected SystemQueryOptionsParameters |
systemQueryOptionsParameters
Set of supported system query options.
|
| Constructor and Description |
|---|
BaseSource() |
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.runtime.api.metadata.TypedValue<T> |
convert(org.mule.runtime.api.metadata.TypedValue<?> payload,
Class<T> outputClazz,
org.mule.runtime.api.metadata.MediaType mediaType) |
protected abstract org.slf4j.Logger |
getLogger() |
protected DefaultRoutingContext |
getRoutingContext(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) |
protected abstract RoutingKey<T,A,SourceConfiguration> |
getRoutingKey() |
protected RoutingManager |
getRoutingManager() |
void |
initialise() |
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) |
void |
onStart(org.mule.runtime.extension.api.runtime.source.SourceCallback<T,A> sourceCallback) |
void |
onStop() |
protected void |
onSuccess(SuccessResponse successResponse,
org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext,
org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
Base implementation for
OnSuccess, derived classes
SHOULD call this on their |
void |
onTerminate(org.mule.runtime.extension.api.runtime.source.SourceResult sourceResult) |
protected final String ROUTING_CONTEXT_KEY
@Config protected ODataConfig odataConfig
@MetadataKeyId @ParameterGroup(name="routingKey") protected ConfigurationRoutingKey routingKey
@ParameterGroup(name="Expansion parameters",
showInDsl=true)
@Summary(value="Set of $expansion-related parameters")
@NullSafe
@Expression(value=NOT_SUPPORTED)
protected ExpansionParameters expansionParameters
@ParameterGroup(name="Supported System Query Options",
showInDsl=true)
@Summary(value="Set of supported system query options")
@NullSafe
@Expression(value=NOT_SUPPORTED)
protected SystemQueryOptionsParameters systemQueryOptionsParameters
protected org.mule.runtime.api.component.location.ComponentLocation location
protected RoutingManager getRoutingManager()
public void onStart(org.mule.runtime.extension.api.runtime.source.SourceCallback<T,A> sourceCallback)
@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)
public void onStop()
@OnTerminate public void onTerminate(org.mule.runtime.extension.api.runtime.source.SourceResult sourceResult)
protected DefaultRoutingContext getRoutingContext(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionprotected abstract RoutingKey<T,A,SourceConfiguration> getRoutingKey()
protected abstract org.slf4j.Logger getLogger()
protected void onSuccess(SuccessResponse successResponse, org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext, org.mule.runtime.extension.api.runtime.source.SourceCompletionCallback completionCallback)
OnSuccess, derived classes
SHOULD call this on their
@OnSuccess<implementations.
successResponse - The response that will be sentcallbackContext - Context to correlate the response to its original messagecompletionCallback - Callback to signal the completion of this async operationCopyright © 2024 MuleSoft, Inc.. All rights reserved.