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 Object
Enables the management of push notification registrations with Ably.
  • Method Details

    • save

      public DeviceDetails save(DeviceDetails device) throws AblyException
      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.
      Returns:
      A DeviceDetails object.
      Throws:
      AblyException
    • saveAsync

      public 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.
    • saveImpl

      protected Http.Request<DeviceDetails> saveImpl(DeviceDetails device)
    • get

      public DeviceDetails get(String deviceId) throws AblyException
      Retrieves the DeviceDetails of a device registered to receive push notifications using its deviceId.

      Spec: RSH1b1

      Parameters:
      deviceId - The unique ID of the device.
      Returns:
      A DeviceDetails object.
      Throws:
      AblyException
    • getAsync

      public 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.
    • getImpl

      protected Http.Request<DeviceDetails> getImpl(String deviceId)
    • list

      public PaginatedResult<DeviceDetails> list(Param[] params) throws AblyException
      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.
      Returns:
      A PaginatedResult object containing an array of DeviceDetails objects.
      Throws:
      AblyException
    • listAsync

      public void listAsync(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.
    • 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 a DeviceDetails object.

      Spec: RSH1b4

      Parameters:
      device - The DeviceDetails object 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 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

      public void remove(String deviceId) throws AblyException
      Removes 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(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<Void> removeImpl(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<Void> removeWhereImpl(Param[] params)