public final class NoOpSubscriptionManager extends java.lang.Object implements SubscriptionManager
SubscriptionManager.Callback<T>| Constructor and Description |
|---|
NoOpSubscriptionManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOnStateChangeListener(OnSubscriptionManagerStateChangeListener onStateChangeListener)
Adds new listener for subscription manager state changes.
|
SubscriptionManagerState |
getState()
Returns the current state of subscription manager.
|
void |
removeOnStateChangeListener(OnSubscriptionManagerStateChangeListener onStateChangeListener)
Removes listener for subscription manager state changes.
|
void |
start()
Put the
SubscriptionManager in a connectible state. |
void |
stop()
Unsubscribe from all active subscriptions, and disconnect the web socket.
|
<T> void |
subscribe(com.apollographql.apollo.api.Subscription<?,T,?> subscription,
SubscriptionManager.Callback<T> callback)
Starts provided subscription.
|
void |
unsubscribe(com.apollographql.apollo.api.Subscription<?,?,?> subscription)
Stops provided subscription.
|
public <T> void subscribe(@NotNull
com.apollographql.apollo.api.Subscription<?,T,?> subscription,
@NotNull
SubscriptionManager.Callback<T> callback)
SubscriptionManagersubscribe in interface SubscriptionManagersubscription - to startcallback - to be called on resultpublic void unsubscribe(@NotNull
com.apollographql.apollo.api.Subscription<?,?,?> subscription)
SubscriptionManagerunsubscribe in interface SubscriptionManagersubscription - to stoppublic void start()
SubscriptionManagerSubscriptionManager in a connectible state. Does not necessarily open a web
socket.start in interface SubscriptionManagerpublic void stop()
SubscriptionManagerstop in interface SubscriptionManagerpublic SubscriptionManagerState getState()
SubscriptionManagergetState in interface SubscriptionManagerpublic void addOnStateChangeListener(@NotNull
OnSubscriptionManagerStateChangeListener onStateChangeListener)
SubscriptionManageraddOnStateChangeListener in interface SubscriptionManageronStateChangeListener - to be called when state changedpublic void removeOnStateChangeListener(@NotNull
OnSubscriptionManagerStateChangeListener onStateChangeListener)
SubscriptionManagerremoveOnStateChangeListener in interface SubscriptionManageronStateChangeListener - to remove