Package com.azure.android.core.http
Interface NextPolicyCallback
-
public interface NextPolicyCallback
The 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.CompletionState
onError(java.lang.Throwable error, PolicyCompleter completer)
The method that receives and intercept theerror
from the next policy.PolicyCompleter.CompletionState
onSuccess(HttpResponse response, PolicyCompleter completer)
The method that receives and intercept theHttpResponse
from the next policy.
-
-
-
Method Detail
-
onSuccess
PolicyCompleter.CompletionState onSuccess(HttpResponse response, PolicyCompleter completer)
The method that receives and intercept theHttpResponse
from the next policy.- Parameters:
response
- The response produced by the next policy.completer
- Once theonSuccess
method completes the receivedresponse
interception, it must use the completer to notify the completion.- Returns:
- The completion state. The implementation of
onSuccess
must 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 theerror
from the next policy.- Parameters:
error
- The error produced by the next policy.completer
- Once theonError
method completes the receivederror
interception, it must use the completer to notify the completion.- Returns:
- The completion state. The implementation of
onSuccess
must return the completion state object returned from the methods incompleter
.
-
-