Class RealApolloPrefetch

    • Constructor Summary

      Constructors 
      Constructor Description
      RealApolloPrefetch​(com.apollographql.apollo.api.Operation operation, okhttp3.HttpUrl serverUrl, okhttp3.Call.Factory httpCallFactory, com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters, java.util.concurrent.Executor dispatcher, com.apollographql.apollo.api.internal.ApolloLogger logger, ApolloCallTracker callTracker)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      Cancels this ApolloPrefetch.
      ApolloPrefetch clone()
      Creates a new, identical ApolloPrefetch to this one which can be enqueued or executed even if this one has already been executed.
      void enqueue​(ApolloPrefetch.Callback responseCallback)
      Schedules the request to be executed at some point in the future.
      boolean isCanceled()
      Checks if this operation has been canceled.
      com.apollographql.apollo.api.Operation operation()
      Returns GraphQL operation this call executes
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RealApolloPrefetch

        public RealApolloPrefetch​(com.apollographql.apollo.api.Operation operation,
                                  okhttp3.HttpUrl serverUrl,
                                  okhttp3.Call.Factory httpCallFactory,
                                  com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters,
                                  java.util.concurrent.Executor dispatcher,
                                  com.apollographql.apollo.api.internal.ApolloLogger logger,
                                  ApolloCallTracker callTracker)
    • Method Detail

      • enqueue

        public void enqueue​(@Nullable
                            ApolloPrefetch.Callback responseCallback)
        Description copied from interface: ApolloPrefetch
        Schedules the request to be executed at some point in the future.
        Specified by:
        enqueue in interface ApolloPrefetch
        Parameters:
        responseCallback - Callback which will handle the success response or a failure exception
      • operation

        @NotNull
        public com.apollographql.apollo.api.Operation operation()
        Description copied from interface: ApolloPrefetch
        Returns GraphQL operation this call executes
        Specified by:
        operation in interface ApolloPrefetch
        Returns:
        Operation
      • clone

        public ApolloPrefetch clone()
        Description copied from interface: ApolloPrefetch
        Creates a new, identical ApolloPrefetch to this one which can be enqueued or executed even if this one has already been executed.
        Specified by:
        clone in interface ApolloPrefetch
        Overrides:
        clone in class java.lang.Object
        Returns:
        The cloned ApolloPrefetch object
      • isCanceled

        public boolean isCanceled()
        Description copied from interface: Cancelable
        Checks if this operation has been canceled.
        Specified by:
        isCanceled in interface Cancelable
        Returns:
        true if this operation has been canceled else returns false