Package com.azure.android.core.http
Interface NextPolicyCallback
-
public interface NextPolicyCallbackThe callback type to receive the result from the next policy in the pipeline.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PolicyCompleter.CompletionStateonError(java.lang.Throwable error, PolicyCompleter completer)The method that receives and intercept theerrorfrom the next policy.PolicyCompleter.CompletionStateonSuccess(HttpResponse response, PolicyCompleter completer)The method that receives and intercept theHttpResponsefrom the next policy.
-
-
-
Method Detail
-
onSuccess
PolicyCompleter.CompletionState onSuccess(HttpResponse response, PolicyCompleter completer)
The method that receives and intercept theHttpResponsefrom the next policy.- Parameters:
response- The response produced by the next policy.completer- Once theonSuccessmethod completes the receivedresponseinterception, it must use the completer to notify the completion.- Returns:
- The completion state. The implementation of
onSuccessmust return the completion state object returned from the methods incompleter.
-
onError
PolicyCompleter.CompletionState onError(java.lang.Throwable error, PolicyCompleter completer)
The method that receives and intercept theerrorfrom the next policy.- Parameters:
error- The error produced by the next policy.completer- Once theonErrormethod completes the receivederrorinterception, it must use the completer to notify the completion.- Returns:
- The completion state. The implementation of
onSuccessmust return the completion state object returned from the methods incompleter.
-
-