T - the generic type of the operation's return typepublic interface InterceptingCallback<T>
The getResult() method gives access to the intercepting operation
actual return type, while the other methods are use for getting notifications
about the execution of the intercepted chain.
A new instance of this class should be returned per each invokation to the intercepting operation.
| Modifier and Type | Method and Description |
|---|---|
T |
getResult()
The operation's result
|
default void |
onComplete()
Always invoked, regardless of the intercepted chain failing,
being successful or even non existing.
|
default void |
onException(Exception exception)
Invoked when the intercepted chain fails to be processed
|
default void |
onSuccess(org.mule.runtime.api.message.Message resultMessage)
This method is invoked when the intercepted chain is
successfully executed.
|
default boolean |
shouldProcessNext()
Defaults to
true |
T getResult() throws Exception
Exception - in case of errordefault boolean shouldProcessNext()
truedefault void onSuccess(org.mule.runtime.api.message.Message resultMessage)
Notice that this method will not be invoked if any of the following conditions are met:
shouldProcessNext() returns falseresultMessage - the message returned by the intercepted chaindefault void onException(Exception exception)
exception - the exception throwndefault void onComplete()
Copyright © 2016 MuleSoft, Inc.. All rights reserved.