Interface ApolloInterceptor.CallBack
-
- Enclosing interface:
- ApolloInterceptor
public static interface ApolloInterceptor.CallBackHandles the responses returned byApolloInterceptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCompleted()Called after the last call toonResponse(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorResponse).voidonFailure(com.apollographql.apollo.exception.ApolloException e)Gets called when an unexpected exception occurs while performing operations on the request or processing the response returned by the next set of interceptors.voidonFetch(ApolloInterceptor.FetchSourceType sourceType)Called when interceptor starts fetching response from source typevoidonResponse(ApolloInterceptor.InterceptorResponse response)Gets called when the interceptor returns a response after successfully performing operations on the request/response.
-
-
-
Method Detail
-
onResponse
void onResponse(@NotNull ApolloInterceptor.InterceptorResponse response)Gets called when the interceptor returns a response after successfully performing operations on the request/response. May be called multiple times.- Parameters:
response- The response returned by the interceptor.
-
onFetch
void onFetch(ApolloInterceptor.FetchSourceType sourceType)
Called when interceptor starts fetching response from source type- Parameters:
sourceType- type of source been used to fetch response from
-
onFailure
void onFailure(@NotNull com.apollographql.apollo.exception.ApolloException e)Gets called when an unexpected exception occurs while performing operations on the request or processing the response returned by the next set of interceptors. Will be called at most once.
-
onCompleted
void onCompleted()
Called after the last call toonResponse(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorResponse). Do not call afteronFailure(ApolloException).
-
-