Class PushBase.DeviceRegistrations

  • Enclosing class:
    PushBase

    public static class PushBase.DeviceRegistrations
    extends java.lang.Object
    Enables the management of push notification registrations with Ably.
    • Method Detail

      • getAsync

        public void getAsync​(java.lang.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.
      • 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.
      • 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​(java.lang.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​(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)