Package io.ably.lib.push
Class PushBase.ChannelSubscriptions
java.lang.Object
io.ably.lib.push.PushBase.ChannelSubscriptions
- Enclosing class:
- PushBase
Enables device push channel subscriptions.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves all push channel subscriptions matching the filter params provided.voidlistAsync(Param[] params, Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback) Asynchronously retrieves all push channel subscriptions matching the filter params provided.listChannels(Param[] params) Retrieves all channels with at least one device subscribed to push notifications.voidlistChannelsAsync(Param[] params, Callback<AsyncPaginatedResult<String>> callback) Asynchronously retrieves all channels with at least one device subscribed to push notifications.protected BasePaginatedQuery.ResultRequest<String>listChannelsImpl(Param[] params) voidremove(PushBase.ChannelSubscription subscription) Unsubscribes a device, or a group of devices sharing the same clientId from receiving push notifications on a channel.voidremoveAsync(PushBase.ChannelSubscription subscription, CompletionListener listener) Asynchronously unsubscribes a device, or a group of devices sharing the same clientId from receiving push notifications on a channel.protected Http.Request<Void>removeImpl(PushBase.ChannelSubscription subscription) voidremoveWhere(Param[] params) Unsubscribes all devices from receiving push notifications on a channel that match the filter params provided.voidremoveWhereAsync(Param[] params, CompletionListener listener) Asynchronously unsubscribes all devices from receiving push notifications on a channel that match the filter params provided.protected Http.Request<Void>removeWhereImpl(Param[] params) save(PushBase.ChannelSubscription subscription) Subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel.voidsaveAsync(PushBase.ChannelSubscription subscription, Callback<PushBase.ChannelSubscription> callback) Asynchronously subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel.protected Http.Request<PushBase.ChannelSubscription>saveImpl(PushBase.ChannelSubscription subscription)
-
Method Details
-
save
public PushBase.ChannelSubscription save(PushBase.ChannelSubscription subscription) throws AblyException Subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel. Returns aPushBase.ChannelSubscriptionobject.Spec: RSH1c3
- Parameters:
-
subscription- APushBase.ChannelSubscriptionobject. - Returns:
- A
PushBase.ChannelSubscriptionobject describing the new or updated subscriptions. - Throws:
AblyException
-
saveAsync
public void saveAsync(PushBase.ChannelSubscription subscription, Callback<PushBase.ChannelSubscription> callback) Asynchronously subscribes a device, or a group of devices sharing the same clientId to push notifications on a channel. Returns aPushBase.ChannelSubscriptionobject.Spec: RSH1c3
- Parameters:
-
subscription- APushBase.ChannelSubscriptionobject. -
callback- A callback returningPushBase.ChannelSubscriptionobject describing the new or updated subscriptions.
-
saveImpl
protected Http.Request<PushBase.ChannelSubscription> saveImpl(PushBase.ChannelSubscription subscription) -
list
Retrieves all push channel subscriptions matching the filter params provided. Returns aPaginatedResultobject, containing an array ofPushBase.ChannelSubscriptionobjects.Spec: RSH1c1
- Parameters:
-
params- An object containing key-value pairs to filter subscriptions by. Can contain channel, clientId, deviceId and a limit on the number of devices returned, up to 1,000. - Returns:
- A
PaginatedResultobject containing an array ofPushBase.ChannelSubscriptionobjects. - Throws:
AblyException
-
listAsync
public void listAsync(Param[] params, Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback) Asynchronously retrieves all push channel subscriptions matching the filter params provided. Returns aPaginatedResultobject, containing an array ofPushBase.ChannelSubscriptionobjects.Spec: RSH1c1
- Parameters:
-
params- An object containing key-value pairs to filter subscriptions by. Can contain channel, clientId, deviceId and a limit on the number of devices returned, up to 1,000. -
callback- A callback returningAsyncPaginatedResultobject containing an array ofPushBase.ChannelSubscriptionobjects. - Throws:
AblyException
-
listImpl
-
remove
Unsubscribes a device, or a group of devices sharing the same clientId from receiving push notifications on a channel.Spec: RSH1c4
- Parameters:
-
subscription- APushBase.ChannelSubscriptionobject. - Throws:
AblyException
-
removeAsync
Asynchronously unsubscribes a device, or a group of devices sharing the same clientId from receiving push notifications on a channel.Spec: RSH1c4
- Parameters:
-
subscription- APushBase.ChannelSubscriptionobject. -
listener- A listener to be notified of success or failure. - Throws:
AblyException
-
removeImpl
-
removeWhere
Unsubscribes all devices from receiving push notifications on a channel that match the filter params provided.Spec: RSH1c5
- Parameters:
-
params- An object containing key-value pairs to filter subscriptions by. Can contain channel, and optionally either clientId or deviceId. - Throws:
AblyException
-
removeWhereAsync
Asynchronously unsubscribes all devices from receiving push notifications on a channel that match the filter params provided.Spec: RSH1c5
- Parameters:
-
params- An object containing key-value pairs to filter subscriptions by. Can contain channel, and optionally either clientId or deviceId. -
listener- A listener to be notified of success or failure. - Throws:
AblyException
-
removeWhereImpl
-
listChannels
Retrieves all channels with at least one device subscribed to push notifications. Returns aPaginatedResultobject, containing an array of channel names.Spec: RSH1c2
- Parameters:
-
params- An object containing key-value pairs to filter channels by. Can contain a limit on the number of channels returned, up to 1,000. - Returns:
- A
PaginatedResultobject containing an array of channel names. - Throws:
AblyException
-
listChannelsAsync
Asynchronously retrieves all channels with at least one device subscribed to push notifications. Returns aPaginatedResultobject, containing an array of channel names.Spec: RSH1c2
- Parameters:
-
params- An object containing key-value pairs to filter channels by. Can contain a limit on the number of channels returned, up to 1,000. -
callback- AAsyncPaginatedResultcallback returning object containing an array of channel names. - Throws:
AblyException
-
listChannelsImpl
-