-
public class PushChannelEnables devices to subscribe to push notifications for a channel.
-
-
Constructor Summary
Constructors Constructor Description PushChannel(Channel channel, AblyRest rest)
-
Method Summary
Modifier and Type Method Description voidsubscribeClient()Subscribes all devices associated with the current device's clientId to push notifications for the channel. voidsubscribeClientAsync(CompletionListener listener)Asynchronously subscribes all devices associated with the current device's clientId to push notifications for the channel. voidsubscribeDevice()Subscribes the device to push notifications for the channel. voidsubscribeDeviceAsync(CompletionListener listener)Asynchronously subscribes the device to push notifications for the channel. voidunsubscribeClient()Unsubscribes all devices associated with the current device's clientId from receiving push notifications for the channel. voidunsubscribeClientAsync(CompletionListener listener)Asynchronously unsubscribes all devices associated with the current device's clientId from receiving push notifications for the channel. voidunsubscribeDevice()Unsubscribes the device from receiving push notifications for the channel. voidunsubscribeDeviceAsync(CompletionListener listener)Unsubscribes the device from receiving push notifications for the channel. PaginatedResult<PushBase.ChannelSubscription>listSubscriptions()Retrieves all push subscriptions for the channel. PaginatedResult<PushBase.ChannelSubscription>listSubscriptions(Array<Param> params)Retrieves all push subscriptions for the channel.Subscriptions can be filtered using a params object. voidlistSubscriptionsAsync(Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback)Asynchronously retrieves all push subscriptions for the channel. voidlistSubscriptionsAsync(Array<Param> params, Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback)Asynchronously retrieves all push subscriptions for the channel.Subscriptions can be filtered using a params object. -
-
Method Detail
-
subscribeClient
void subscribeClient()
Subscribes all devices associated with the current device's clientId to push notifications for the channel.
Spec: RSH7b
-
subscribeClientAsync
void subscribeClientAsync(CompletionListener listener)
Asynchronously subscribes all devices associated with the current device's clientId to push notifications for the channel.
Spec: RSH7b
- Parameters:
listener- A listener may optionally be passed in to this call to be notified of success or failure.
-
subscribeDevice
void subscribeDevice()
Subscribes the device to push notifications for the channel.
Spec: RSH7a
-
subscribeDeviceAsync
void subscribeDeviceAsync(CompletionListener listener)
Asynchronously subscribes the device to push notifications for the channel.
Spec: RSH7a
- Parameters:
listener- A listener may optionally be passed in to this call to be notified of success or failure.
-
unsubscribeClient
void unsubscribeClient()
Unsubscribes all devices associated with the current device's clientId from receiving push notifications for the channel.
Spec: RSH7d
-
unsubscribeClientAsync
void unsubscribeClientAsync(CompletionListener listener)
Asynchronously unsubscribes all devices associated with the current device's clientId from receiving push notifications for the channel.
Spec: RSH7d
- Parameters:
listener- A listener may optionally be passed in to this call to be notified of success or failure.
-
unsubscribeDevice
void unsubscribeDevice()
Unsubscribes the device from receiving push notifications for the channel.
Spec: RSH7c
-
unsubscribeDeviceAsync
void unsubscribeDeviceAsync(CompletionListener listener)
Unsubscribes the device from receiving push notifications for the channel.
Spec: RSH7c
- Parameters:
listener- A listener may optionally be passed in to this call to be notified of success or failure.
-
listSubscriptions
PaginatedResult<PushBase.ChannelSubscription> listSubscriptions()
Retrieves all push subscriptions for the channel.
Spec: RSH7e
-
listSubscriptions
PaginatedResult<PushBase.ChannelSubscription> listSubscriptions(Array<Param> params)
Retrieves all push subscriptions for the channel.Subscriptions can be filtered using a params object.
Spec: RSH7e
- Parameters:
params- An array of Param objects.
-
listSubscriptionsAsync
void listSubscriptionsAsync(Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback)
Asynchronously retrieves all push subscriptions for the channel.
Spec: RSH7e
- Parameters:
callback- A Callback returning AsyncPaginatedResult object containing an array of Push.ChannelSubscription objects.
-
listSubscriptionsAsync
void listSubscriptionsAsync(Array<Param> params, Callback<AsyncPaginatedResult<PushBase.ChannelSubscription>> callback)
Asynchronously retrieves all push subscriptions for the channel.Subscriptions can be filtered using a params object.
Spec: RSH7e
- Parameters:
params- An array of Param objects.callback- A Callback returning AsyncPaginatedResult object containing an array of Push.ChannelSubscription objects.
-
-
-
-