public final class RealApolloPrefetch extends java.lang.Object implements ApolloPrefetch
ApolloPrefetch.Callback, ApolloPrefetch.Factory| Constructor and Description |
|---|
RealApolloPrefetch(com.apollographql.apollo.api.Operation operation,
okhttp3.HttpUrl serverUrl,
okhttp3.Call.Factory httpCallFactory,
com.apollographql.apollo.response.ScalarTypeAdapters scalarTypeAdapters,
java.util.concurrent.Executor dispatcher,
com.apollographql.apollo.internal.ApolloLogger logger,
ApolloCallTracker callTracker) |
| Modifier and Type | Method and 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
|
public RealApolloPrefetch(com.apollographql.apollo.api.Operation operation,
okhttp3.HttpUrl serverUrl,
okhttp3.Call.Factory httpCallFactory,
com.apollographql.apollo.response.ScalarTypeAdapters scalarTypeAdapters,
java.util.concurrent.Executor dispatcher,
com.apollographql.apollo.internal.ApolloLogger logger,
ApolloCallTracker callTracker)
public void enqueue(@Nullable
ApolloPrefetch.Callback responseCallback)
ApolloPrefetchenqueue in interface ApolloPrefetchresponseCallback - Callback which will handle the success response or a failure exception@NotNull public com.apollographql.apollo.api.Operation operation()
ApolloPrefetchoperation in interface ApolloPrefetchOperationpublic ApolloPrefetch clone()
ApolloPrefetchclone in interface ApolloPrefetchclone in class java.lang.Objectpublic void cancel()
ApolloPrefetchApolloPrefetch. If the call has already completed, nothing will happen.
If the call is outgoing, an ApolloCanceledException will be thrown if the call was started
with #execute(). If the call was started with ApolloPrefetch.enqueue(Callback)
the ApolloPrefetch.Callback will be disposed, and will receive no more events.
The call will attempt to abort and release resources, if possible.cancel in interface ApolloPrefetchcancel in interface Cancelablepublic boolean isCanceled()
CancelableisCanceled in interface Cancelable