public interface SubscriptionManager
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SubscriptionManager.Callback<T> |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(com.apollographql.apollo.api.Subscription subscription,
AppSyncSubscriptionCall.Callback callback)
Sets the listener based on the subscription's operation (unique) id
|
void |
removeListener(com.apollographql.apollo.api.Subscription subscription,
AppSyncSubscriptionCall.Callback callback)
Removes the listener based on the subscription's operation (unique) id
|
void |
setScalarTypeAdapters(ScalarTypeAdapters scalarTypeAdapters) |
void |
setStore(ApolloStore apolloStore)
Sets the store used for cache updates based on subscription responses.
|
<T> void |
subscribe(com.apollographql.apollo.api.Subscription<?,T,?> subscription,
java.util.List<java.lang.String> subbedTopics,
SubscriptionResponse response,
ResponseNormalizer<java.util.Map<java.lang.String,java.lang.Object>> mapResponseNormalizer)
Make a connection and subscribe to all topics.
|
void |
unsubscribe(com.apollographql.apollo.api.Subscription<?,?,?> subscription) |
<T> void subscribe(@Nonnull
com.apollographql.apollo.api.Subscription<?,T,?> subscription,
@Nonnull
java.util.List<java.lang.String> subbedTopics,
@Nonnull
SubscriptionResponse response,
ResponseNormalizer<java.util.Map<java.lang.String,java.lang.Object>> mapResponseNormalizer)
T - The type of the repsonse datasubscription - The operation that has parsing logic, operation id, etc.subbedTopics - The topics relevant to the subscription.response - list of mqtt connections and topicsmapResponseNormalizer - void unsubscribe(@Nonnull
com.apollographql.apollo.api.Subscription<?,?,?> subscription)
void addListener(com.apollographql.apollo.api.Subscription subscription,
AppSyncSubscriptionCall.Callback callback)
subscription - The subscription for which callbacks will be triggered.callback - The callback for messages received on the subscription connection.void removeListener(com.apollographql.apollo.api.Subscription subscription,
AppSyncSubscriptionCall.Callback callback)
subscription - The subscription for which callbacks will be triggered.callback - The callback for messages received on the subscription connection.void setStore(ApolloStore apolloStore)
apolloStore - void setScalarTypeAdapters(ScalarTypeAdapters scalarTypeAdapters)