-
public class PushBase.DeviceRegistrationsEnables the management of push notification registrations with Ably.
-
-
Method Summary
Modifier and Type Method Description DeviceDetailssave(DeviceDetails device)Registers or updates a DeviceDetails object with Ably. voidsaveAsync(DeviceDetails device, Callback<DeviceDetails> callback)Asynchronously registers or updates a DeviceDetails object with Ably. DeviceDetailsget(String deviceId)Retrieves the DeviceDetails of a device registered to receive push notifications using its deviceId. voidgetAsync(String deviceId, Callback<DeviceDetails> callback)Asynchronously retrieves the DeviceDetails of a device registered to receive push notifications using its deviceId. PaginatedResult<DeviceDetails>list(Array<Param> params)Retrieves all devices matching the filter params provided. voidlistAsync(Array<Param> params, Callback<AsyncPaginatedResult<DeviceDetails>> callback)Asynchronously retrieves all devices matching the filter params provided. voidremove(DeviceDetails device)Removes a device registered to receive push notifications from Ably using the id property of a DeviceDetails object. voidremoveAsync(DeviceDetails device, CompletionListener listener)Asynchronously removes a device registered to receive push notifications from Ably using the id property of a DeviceDetails object. voidremove(String deviceId)Removes a device registered to receive push notifications from Ably using its deviceId. voidremoveAsync(String deviceId, CompletionListener listener)Asynchronously removes a device registered to receive push notifications from Ably using its deviceId. voidremoveWhere(Array<Param> params)Removes all devices registered to receive push notifications from Ably matching the filter params provided. voidremoveWhereAsync(Array<Param> params, CompletionListener listener)Removes all devices registered to receive push notifications from Ably matching the filter params provided. -
-
Method Detail
-
save
DeviceDetails save(DeviceDetails device)
Registers or updates a DeviceDetails object with Ably.Returns the new, or updated DeviceDetails object.
Spec: RSH1b3
- Parameters:
device- The DeviceDetails object to create or update.
-
saveAsync
void saveAsync(DeviceDetails device, Callback<DeviceDetails> callback)
Asynchronously registers or updates a DeviceDetails object with Ably.Returns the new, or updated DeviceDetails object.
Spec: RSH1b3
- Parameters:
device- The DeviceDetails object to create or update.callback- A callback returning a DeviceDetails object.
-
get
DeviceDetails get(String deviceId)
Retrieves the DeviceDetails of a device registered to receive push notifications using its deviceId.
Spec: RSH1b1
- Parameters:
deviceId- The unique ID of the device.
-
getAsync
void getAsync(String deviceId, Callback<DeviceDetails> callback)
Asynchronously retrieves the DeviceDetails of a device registered to receive push notifications using its deviceId.
Spec: RSH1b1
- Parameters:
deviceId- The unique ID of the device.callback- A callback returning a DeviceDetails object.
-
list
PaginatedResult<DeviceDetails> list(Array<Param> params)
Retrieves all devices matching the filter params provided.Returns a PaginatedResult object, containing an array of DeviceDetails objects.
Spec: RSH1b2
- Parameters:
params- An object containing key-value pairs to filter devices by.Can contain clientId, deviceId and a limit on the number of devices returned, up to 1,000.
-
listAsync
void listAsync(Array<Param> params, Callback<AsyncPaginatedResult<DeviceDetails>> callback)
Asynchronously retrieves all devices matching the filter params provided.Returns a AsyncPaginatedResult object, containing an array of DeviceDetails objects.
Spec: RSH1b2
- Parameters:
params- An object containing key-value pairs to filter devices by.Can contain clientId, deviceId and a limit on the number of devices returned, up to 1,000.callback- A callback returning a AsyncPaginatedResult object containing an array of DeviceDetails objects.
-
remove
void remove(DeviceDetails device)
Removes a device registered to receive push notifications from Ably using the id property of a DeviceDetails object.
Spec: RSH1b4
- Parameters:
device- The DeviceDetails object containing the id property of the device.
-
removeAsync
void removeAsync(DeviceDetails device, CompletionListener listener)
Asynchronously removes a device registered to receive push notifications from Ably using the id property of a DeviceDetails object.
Spec: RSH1b4
- Parameters:
device- The DeviceDetails object containing the id property of the device.listener- A listener to be notified of success or failure.
-
remove
void remove(String deviceId)
Removes a device registered to receive push notifications from Ably using its deviceId.
Spec: RSH1b4
- Parameters:
deviceId- The unique ID of the device.
-
removeAsync
void removeAsync(String deviceId, CompletionListener listener)
Asynchronously removes a device registered to receive push notifications from Ably using its deviceId.
Spec: RSH1b4
- Parameters:
deviceId- The unique ID of the device.listener- A listener to be notified of success or failure.
-
removeWhere
void removeWhere(Array<Param> params)
Removes all devices registered to receive push notifications from Ably matching the filter params provided.
Spec: RSH1b5
- Parameters:
params- An object containing key-value pairs to filter devices by.
-
removeWhereAsync
void removeWhereAsync(Array<Param> params, CompletionListener listener)
Removes all devices registered to receive push notifications from Ably matching the filter params provided.
Spec: RSH1b5
- Parameters:
params- An object containing key-value pairs to filter devices by.listener- A listener to be notified of success or failure.
-
-
-
-