Package io.ably.lib.push
Class PushBase.ChannelSubscriptions
- java.lang.Object
-
- io.ably.lib.push.PushBase.ChannelSubscriptions
-
- Enclosing class:
- PushBase
public static class PushBase.ChannelSubscriptions extends java.lang.ObjectEnables device push channel subscriptions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PaginatedResult<PushBase.ChannelSubscription>list(Param[] params)Retrieves 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.PaginatedResult<java.lang.String>listChannels(Param[] params)Retrieves all channels with at least one device subscribed to push notifications.voidlistChannelsAsync(Param[] params, Callback<AsyncPaginatedResult<java.lang.String>> callback)Asynchronously retrieves all channels with at least one device subscribed to push notifications.protected BasePaginatedQuery.ResultRequest<java.lang.String>listChannelsImpl(Param[] params)protected BasePaginatedQuery.ResultRequest<PushBase.ChannelSubscription>listImpl(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<java.lang.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<java.lang.Void>removeWhereImpl(Param[] params)PushBase.ChannelSubscriptionsave(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 Detail
-
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
public PaginatedResult<PushBase.ChannelSubscription> list(Param[] params) throws AblyException
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
protected BasePaginatedQuery.ResultRequest<PushBase.ChannelSubscription> listImpl(Param[] params)
-
remove
public void remove(PushBase.ChannelSubscription subscription) throws AblyException
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
public void removeAsync(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.Spec: RSH1c4
- Parameters:
subscription- APushBase.ChannelSubscriptionobject.listener- A listener to be notified of success or failure.- Throws:
AblyException
-
removeImpl
protected Http.Request<java.lang.Void> removeImpl(PushBase.ChannelSubscription subscription)
-
removeWhere
public void removeWhere(Param[] params) throws AblyException
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
public void removeWhereAsync(Param[] params, CompletionListener listener)
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
protected Http.Request<java.lang.Void> removeWhereImpl(Param[] params)
-
listChannels
public PaginatedResult<java.lang.String> listChannels(Param[] params) throws AblyException
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
public void listChannelsAsync(Param[] params, Callback<AsyncPaginatedResult<java.lang.String>> callback)
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
protected BasePaginatedQuery.ResultRequest<java.lang.String> listChannelsImpl(Param[] params)
-
-