public final class RealAppSyncPrefetch extends java.lang.Object implements AppSyncPrefetch
AppSyncPrefetch.Callback, AppSyncPrefetch.Factory| Constructor and Description |
|---|
RealAppSyncPrefetch(com.apollographql.apollo.api.Operation operation,
okhttp3.HttpUrl serverUrl,
okhttp3.Call.Factory httpCallFactory,
ScalarTypeAdapters scalarTypeAdapters,
java.util.concurrent.Executor dispatcher,
com.apollographql.apollo.internal.ApolloLogger logger,
ApolloCallTracker callTracker,
boolean sendOperationIds) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels this
AppSyncPrefetch. |
AppSyncPrefetch |
clone()
Creates a new, identical AppSyncPrefetch to this one which can be enqueued or executed even if this one has already
been executed.
|
void |
enqueue(AppSyncPrefetch.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 RealAppSyncPrefetch(com.apollographql.apollo.api.Operation operation,
okhttp3.HttpUrl serverUrl,
okhttp3.Call.Factory httpCallFactory,
ScalarTypeAdapters scalarTypeAdapters,
java.util.concurrent.Executor dispatcher,
com.apollographql.apollo.internal.ApolloLogger logger,
ApolloCallTracker callTracker,
boolean sendOperationIds)
public void enqueue(@Nullable
AppSyncPrefetch.Callback responseCallback)
AppSyncPrefetchenqueue in interface AppSyncPrefetchresponseCallback - Callback which will handle the success response or a failure exception@Nonnull public com.apollographql.apollo.api.Operation operation()
AppSyncPrefetchoperation in interface AppSyncPrefetchOperationpublic AppSyncPrefetch clone()
AppSyncPrefetchclone in interface AppSyncPrefetchclone in class java.lang.Objectpublic void cancel()
AppSyncPrefetchAppSyncPrefetch. 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 AppSyncPrefetch.enqueue(Callback)
the AppSyncPrefetch.Callback will be disposed, and will receive no more events.
The call will attempt to abort and release resources, if possible.cancel in interface AppSyncPrefetchcancel in interface Cancelablepublic boolean isCanceled()
CancelableisCanceled in interface Cancelable