public class RealApolloSubscriptionCall<T> extends java.lang.Object implements ApolloSubscriptionCall<T>
ApolloSubscriptionCall.Callback<T>, ApolloSubscriptionCall.Factory| Constructor and Description |
|---|
RealApolloSubscriptionCall(com.apollographql.apollo.api.Subscription<?,T,?> subscription,
SubscriptionManager subscriptionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the operation.
|
ApolloSubscriptionCall<T> |
clone()
Creates a new, identical call to this one which can be executed even if this call has already been.
|
void |
execute(ApolloSubscriptionCall.Callback<T> callback)
Sends
Subscription to the subscription server and starts listening for the pushed updates. |
boolean |
isCanceled()
Checks if this operation has been canceled.
|
public RealApolloSubscriptionCall(com.apollographql.apollo.api.Subscription<?,T,?> subscription, SubscriptionManager subscriptionManager)
public void execute(@NotNull
ApolloSubscriptionCall.Callback<T> callback)
throws ApolloCanceledException
ApolloSubscriptionCallSubscription to the subscription server and starts listening for the pushed updates. To cancel this
subscription call use Cancelable.cancel().execute in interface ApolloSubscriptionCall<T>callback - which will handle the subscription updates or a failure exception.ApolloCanceledException - when the call has already been canceledpublic void cancel()
Cancelablecancel in interface Cancelablepublic ApolloSubscriptionCall<T> clone()
ApolloSubscriptionCallclone in interface ApolloSubscriptionCall<T>clone in class java.lang.ObjectApolloSubscriptionCall object.public boolean isCanceled()
CancelableisCanceled in interface Cancelable