Package com.apollographql.apollo
Class ApolloPrefetch.Callback
- java.lang.Object
-
- com.apollographql.apollo.ApolloPrefetch.Callback
-
- Enclosing interface:
- ApolloPrefetch
public abstract static class ApolloPrefetch.Callback extends java.lang.ObjectCommunicates responses from the server.
-
-
Constructor Summary
Constructors Constructor Description Callback()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidonCanceledError(ApolloCanceledException e)Gets called whenApolloCallhas been canceled.abstract voidonFailure(com.apollographql.apollo.exception.ApolloException e)Gets called when an unexpected exception occurs while creating the request or processing the response.voidonHttpError(ApolloHttpException e)Gets called when an http request error takes place.voidonNetworkError(ApolloNetworkException e)Gets called when an http request error takes place due to network failures, timeouts etc.abstract voidonSuccess()Gets called when the request has succeeded.
-
-
-
Method Detail
-
onSuccess
public abstract void onSuccess()
Gets called when the request has succeeded.
-
onFailure
public abstract void onFailure(@NotNull com.apollographql.apollo.exception.ApolloException e)Gets called when an unexpected exception occurs while creating the request or processing the response.
-
onHttpError
public void onHttpError(@NotNull ApolloHttpException e)Gets called when an http request error takes place. This is the case when the returned http status code doesn't lie in the range 200 (inclusive) and 300 (exclusive).
-
onNetworkError
public void onNetworkError(@NotNull ApolloNetworkException e)Gets called when an http request error takes place due to network failures, timeouts etc.
-
onCanceledError
public void onCanceledError(@NotNull ApolloCanceledException e)Gets called whenApolloCallhas been canceled.
-
-