Package io.ably.lib.push
Class PushBase.DeviceRegistrations
- java.lang.Object
-
- io.ably.lib.push.PushBase.DeviceRegistrations
-
- Enclosing class:
- PushBase
public static class PushBase.DeviceRegistrations extends java.lang.ObjectEnables the management of push notification registrations with Ably.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviceDetailsget(java.lang.String deviceId)Retrieves theDeviceDetailsof a device registered to receive push notifications using its deviceId.voidgetAsync(java.lang.String deviceId, Callback<DeviceDetails> callback)Asynchronously retrieves theDeviceDetailsof a device registered to receive push notifications using its deviceId.protected Http.Request<DeviceDetails>getImpl(java.lang.String deviceId)PaginatedResult<DeviceDetails>list(Param[] params)Retrieves all devices matching the filter params provided.voidlistAsync(Param[] params, Callback<AsyncPaginatedResult<DeviceDetails>> callback)Asynchronously retrieves all devices matching the filter params provided.protected BasePaginatedQuery.ResultRequest<DeviceDetails>listImpl(Param[] params)voidremove(DeviceDetails device)Removes a device registered to receive push notifications from Ably using the id property of aDeviceDetailsobject.voidremove(java.lang.String deviceId)Removes a device registered to receive push notifications from Ably using its deviceId.voidremoveAsync(DeviceDetails device, CompletionListener listener)Asynchronously removes a device registered to receive push notifications from Ably using the id property of aDeviceDetailsobject.voidremoveAsync(java.lang.String deviceId, CompletionListener listener)Asynchronously removes a device registered to receive push notifications from Ably using its deviceId.protected Http.Request<java.lang.Void>removeImpl(java.lang.String deviceId)voidremoveWhere(Param[] params)Removes all devices registered to receive push notifications from Ably matching the filter params provided.voidremoveWhereAsync(Param[] params, CompletionListener listener)Removes all devices registered to receive push notifications from Ably matching the filter params provided.protected Http.Request<java.lang.Void>removeWhereImpl(Param[] params)DeviceDetailssave(DeviceDetails device)Registers or updates aDeviceDetailsobject with Ably.voidsaveAsync(DeviceDetails device, Callback<DeviceDetails> callback)Asynchronously registers or updates aDeviceDetailsobject with Ably.protected Http.Request<DeviceDetails>saveImpl(DeviceDetails device)
-
-
-
Method Detail
-
save
public DeviceDetails save(DeviceDetails device) throws AblyException
Registers or updates aDeviceDetailsobject with Ably. Returns the new, or updatedDeviceDetailsobject.Spec: RSH1b3
- Parameters:
device- TheDeviceDetailsobject to create or update.- Returns:
- A
DeviceDetailsobject. - Throws:
AblyException
-
saveAsync
public void saveAsync(DeviceDetails device, Callback<DeviceDetails> callback)
Asynchronously registers or updates aDeviceDetailsobject with Ably. Returns the new, or updatedDeviceDetailsobject.Spec: RSH1b3
- Parameters:
device- TheDeviceDetailsobject to create or update.callback- A callback returning aDeviceDetailsobject.
-
saveImpl
protected Http.Request<DeviceDetails> saveImpl(DeviceDetails device)
-
get
public DeviceDetails get(java.lang.String deviceId) throws AblyException
Retrieves theDeviceDetailsof a device registered to receive push notifications using its deviceId.Spec: RSH1b1
- Parameters:
deviceId- The unique ID of the device.- Returns:
- A
DeviceDetailsobject. - Throws:
AblyException
-
getAsync
public void getAsync(java.lang.String deviceId, Callback<DeviceDetails> callback)Asynchronously retrieves theDeviceDetailsof a device registered to receive push notifications using its deviceId.Spec: RSH1b1
- Parameters:
deviceId- The unique ID of the device.callback- A callback returning aDeviceDetailsobject.
-
getImpl
protected Http.Request<DeviceDetails> getImpl(java.lang.String deviceId)
-
list
public PaginatedResult<DeviceDetails> list(Param[] params) throws AblyException
Retrieves all devices matching the filter params provided. Returns aPaginatedResultobject, containing an array ofDeviceDetailsobjects.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.- Returns:
- A
PaginatedResultobject containing an array ofDeviceDetailsobjects. - Throws:
AblyException
-
listAsync
public void listAsync(Param[] params, Callback<AsyncPaginatedResult<DeviceDetails>> callback)
Asynchronously retrieves all devices matching the filter params provided. Returns aAsyncPaginatedResultobject, containing an array ofDeviceDetailsobjects.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 aAsyncPaginatedResultobject containing an array ofDeviceDetailsobjects.
-
listImpl
protected BasePaginatedQuery.ResultRequest<DeviceDetails> listImpl(Param[] params)
-
remove
public void remove(DeviceDetails device) throws AblyException
Removes a device registered to receive push notifications from Ably using the id property of aDeviceDetailsobject.Spec: RSH1b4
- Parameters:
device- TheDeviceDetailsobject containing the id property of the device.- Throws:
AblyException
-
removeAsync
public void removeAsync(DeviceDetails device, CompletionListener listener)
Asynchronously removes a device registered to receive push notifications from Ably using the id property of aDeviceDetailsobject.Spec: RSH1b4
- Parameters:
device- TheDeviceDetailsobject containing the id property of the device.listener- A listener to be notified of success or failure.
-
remove
public void remove(java.lang.String deviceId) throws AblyExceptionRemoves a device registered to receive push notifications from Ably using its deviceId.Spec: RSH1b4
- Parameters:
deviceId- The unique ID of the device.- Throws:
AblyException
-
removeAsync
public void removeAsync(java.lang.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.
-
removeImpl
protected Http.Request<java.lang.Void> removeImpl(java.lang.String deviceId)
-
removeWhere
public void removeWhere(Param[] params) throws AblyException
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. Can contain clientId and deviceId.- Throws:
AblyException
-
removeWhereAsync
public void removeWhereAsync(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. Can contain clientId and deviceId.listener- A listener to be notified of success or failure.
-
removeWhereImpl
protected Http.Request<java.lang.Void> removeWhereImpl(Param[] params)
-
-