Interface CallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT extends StdCallbackContext>
-
- Type Parameters:
RequestT- , the web service request that was madeResponseT- the response or the fault (Exception) that needs to handledClientT- , the client that was used to invokeModelT- , the resource model object that we are currently working againstCallbackT- , the callback context that contains results
- All Superinterfaces:
CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>
- All Known Subinterfaces:
CallChain.Stabilizer<RequestT,ResponseT,ClientT,ModelT,CallbackT>
- Enclosing interface:
- CallChain
public static interface CallChain.Exceptional<RequestT,ResponseT,ClientT,ModelT,CallbackT extends StdCallbackContext> extends CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>
This provide the handler with the option to provide an explicit exception handler that would have service exceptions that was received.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>exceptFilter(CallChain.Callback<? super RequestT,Exception,ClientT,ModelT,CallbackT,Boolean> handler)Deprecated.default CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>exceptHandler(CallChain.ExceptionPropagate<? super RequestT,Exception,ClientT,ModelT,CallbackT,ProgressEvent<ModelT,CallbackT>> handler)Deprecated.CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>handleError(CallChain.ExceptionPropagate<? super RequestT,Exception,ClientT,ModelT,CallbackT,ProgressEvent<ModelT,CallbackT>> handler)CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT>retryErrorFilter(CallChain.Callback<? super RequestT,Exception,ClientT,ModelT,CallbackT,Boolean> handler)
-
-
-
Method Detail
-
exceptFilter
@Deprecated default CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT> exceptFilter(CallChain.Callback<? super RequestT,Exception,ClientT,ModelT,CallbackT,Boolean> handler)
Deprecated.- Parameters:
handler- , a predicate lambda expression that take the web request, response, client, model and context and says continue or fail operation- Returns:
- true of you want to attempt another retry of the operation. false to indicate propagate error/fault.
-
retryErrorFilter
CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT> retryErrorFilter(CallChain.Callback<? super RequestT,Exception,ClientT,ModelT,CallbackT,Boolean> handler)
- Parameters:
handler- , a predicate lambda expression that takes the web request, exception, client, model and context to determine to retry the exception thrown by the service or fail operation. This is the simpler model thenhandleError(ExceptionPropagate)for most common retry scenarios If we need more control over the outcome, then usehandleError(ExceptionPropagate)- Returns:
- true of you want to attempt another retry of the operation. false to indicate propagate error/fault.
-
exceptHandler
@Deprecated default CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT> exceptHandler(CallChain.ExceptionPropagate<? super RequestT,Exception,ClientT,ModelT,CallbackT,ProgressEvent<ModelT,CallbackT>> handler)
Deprecated.- Parameters:
handler- , a lambda expression that takes the web request, response, client, model and context returns a successful or failedProgressEventback or can rethrow service exception to propagate errors. If handler needs to retry the exception, the it will throw aRetryableException- Returns:
- a ProgressEvent for the model
-
handleError
CallChain.Completed<RequestT,ResponseT,ClientT,ModelT,CallbackT> handleError(CallChain.ExceptionPropagate<? super RequestT,Exception,ClientT,ModelT,CallbackT,ProgressEvent<ModelT,CallbackT>> handler)
- Parameters:
handler- , a lambda expression that take the web request, response, client, model and context and says continue or fail operation by providing the appropriateProgressEventback.- Returns:
- If status is
OperationStatus.IN_PROGRESSwe will attempt another retry. Otherwise failure is propagated.
-
-