Class ApolloPrefetch.Callback

  • Enclosing interface:
    ApolloPrefetch

    public abstract static class ApolloPrefetch.Callback
    extends java.lang.Object
    Communicates responses from the server.
    • Constructor Detail

      • Callback

        public Callback()
    • 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.