public class SourceAdapter.DefaultSourceCompletionHandler extends Object implements SourceCompletionHandler
| Constructor and Description |
|---|
DefaultSourceCompletionHandler(org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onSuccessExecutor,
org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onErrorExecutor,
org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onTerminateExecutor,
org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onBackPressureExecutor,
SourceCallbackContextAdapter context) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
createFailureResponseParameters(CoreEvent event)
Resolves the set of parameters of the failure response function of the source against
the supplied
Event. |
Map<String,Object> |
createResponseParameters(CoreEvent event)
Resolves the set of parameters of the response function of the source against
the supplied
Event. |
void |
onCompletion(CoreEvent event,
Map<String,Object> parameters,
org.mule.runtime.api.component.execution.CompletableCallback<Void> callback)
Invoked on successful completion of flow processing.
|
void |
onFailure(MessagingException exception,
Map<String,Object> parameters,
org.mule.runtime.api.component.execution.CompletableCallback<Void> callback)
Invoked when a failure occurs during the flow processing
|
void |
onTerminate(org.mule.runtime.api.functional.Either<MessagingException,CoreEvent> result) |
public DefaultSourceCompletionHandler(org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onSuccessExecutor,
org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onErrorExecutor,
org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onTerminateExecutor,
org.mule.runtime.module.extension.internal.runtime.source.SourceCallbackExecutor onBackPressureExecutor,
SourceCallbackContextAdapter context)
public void onCompletion(CoreEvent event, Map<String,Object> parameters, org.mule.runtime.api.component.execution.CompletableCallback<Void> callback)
SourceCompletionHandler
Exceptions found while processing are to be notified through
the exceptionCallback, which might (depending on HandledCompletionExceptionResult)
produce a new value as the result of handling such error
onCompletion in interface SourceCompletionHandlerevent - the result of the flow executioncallback - the callback to be completed as a resultpublic void onFailure(MessagingException exception, Map<String,Object> parameters, org.mule.runtime.api.component.execution.CompletableCallback<Void> callback)
SourceCompletionHandleronFailure in interface SourceCompletionHandlerexception - the exception thrown during processingcallback - the callback to be completed as a resultpublic void onTerminate(org.mule.runtime.api.functional.Either<MessagingException,CoreEvent> result) throws Exception
onTerminate in interface SourceCompletionHandlerExceptionpublic Map<String,Object> createResponseParameters(CoreEvent event) throws MessagingException
SourceCompletionHandlerEvent.createResponseParameters in interface SourceCompletionHandlerevent - the Event with the result of the successful flow processing.MessagingExceptionpublic Map<String,Object> createFailureResponseParameters(CoreEvent event) throws MessagingException
SourceCompletionHandlerEvent.createFailureResponseParameters in interface SourceCompletionHandlerevent - the Event with the result of the failed flow processing.MessagingExceptionCopyright © 2003–2020 MuleSoft, Inc.. All rights reserved.