Class PushBase.ChannelSubscription

  • Enclosing class:
    PushBase

    public static class PushBase.ChannelSubscription
    extends java.lang.Object
    Contains the subscriptions of a device, or a group of devices sharing the same clientId, has to a channel in order to receive push notifications.
    • Field Detail

      • channel

        public final java.lang.String channel
        The channel the push notification subscription is for.

        Spec: PCS4

      • deviceId

        public final java.lang.String deviceId
        The unique ID of the device.

        Spec: PCS2, PCS5, PCS6

      • clientId

        public final java.lang.String clientId
        The ID of the client the device, or devices are associated to.

        Spec: PCS3, PCS6

    • Method Detail

      • forDevice

        public static PushBase.ChannelSubscription forDevice​(java.lang.String channel,
                                                             java.lang.String deviceId)
        A static factory method to create a PushChannelSubscription object for a channel and single device.
        Parameters:
        channel - The channel name.
        deviceId - The unique ID of the device.
        Returns:
        A PushBase.ChannelSubscription object.
      • forClientId

        public static PushBase.ChannelSubscription forClientId​(java.lang.String channel,
                                                               java.lang.String clientId)
        A static factory method to create a PushChannelSubscription object for a channel and group of devices sharing the same clientId.
        Parameters:
        channel - The channel name.
        clientId - The ID of the client.
        Returns:
        A PushBase.ChannelSubscription object.
      • toJsonObject

        public com.google.gson.JsonObject toJsonObject()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object