public final class SourceResult extends Object
Source through a flow,
this reports whether the result of the processing was successful or terminated with errors.
The purpose of this class is to be used as input of the OnTerminate callback of a
Source so that this callback can operate according to the result.| Modifier and Type | Method and Description |
|---|---|
Optional<org.mule.runtime.api.message.Error> |
getInvocationError()
|
Optional<org.mule.runtime.api.message.Error> |
getResponseError()
|
SourceCallbackContext |
getSourceCallbackContext() |
static SourceResult |
invocationError(org.mule.runtime.api.message.Error invocationError,
SourceCallbackContext sourceCallbackContext) |
boolean |
isSuccess()
Indicates whether an error has occurred or not processing a message from a
Source through the owned flow |
static SourceResult |
responseError(org.mule.runtime.api.message.Error responseError,
SourceCallbackContext sourceCallbackContext) |
static SourceResult |
success(SourceCallbackContext sourceCallbackContext) |
public static SourceResult success(SourceCallbackContext sourceCallbackContext)
public static SourceResult responseError(org.mule.runtime.api.message.Error responseError, SourceCallbackContext sourceCallbackContext)
public static SourceResult invocationError(org.mule.runtime.api.message.Error invocationError, SourceCallbackContext sourceCallbackContext)
public boolean isSuccess()
Source through the owned flowpublic Optional<org.mule.runtime.api.message.Error> getInvocationError()
OnSuccess or OnError.
This could be either due to errors when generating required error parameters,
or due to an exception thrown inside an error handler message processor.public Optional<org.mule.runtime.api.message.Error> getResponseError()
OnSuccess or OnError).public SourceCallbackContext getSourceCallbackContext()
SourceCallbackContext of the message that is being processing.Copyright © 2017 MuleSoft, Inc.. All rights reserved.