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<Error> |
getInvocationError()
|
Optional<Error> |
getResponseError()
|
SourceCallbackContext |
getSourceCallbackContext() |
static SourceResult |
invocationError(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(Error responseError,
SourceCallbackContext sourceCallbackContext) |
static SourceResult |
success(SourceCallbackContext sourceCallbackContext) |
public static SourceResult success(SourceCallbackContext sourceCallbackContext)
public static SourceResult responseError(Error responseError, SourceCallbackContext sourceCallbackContext)
public static SourceResult invocationError(Error invocationError, SourceCallbackContext sourceCallbackContext)
public boolean isSuccess()
Source
through the owned flowpublic Optional<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<Error> getResponseError()
OnSuccess
or OnError
).public SourceCallbackContext getSourceCallbackContext()
SourceCallbackContext
of the message that is being processing.Copyright © 2018. All rights reserved.