Package io.ably.lib.push
Class PushBase.ChannelSubscription
java.lang.Object
io.ably.lib.push.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 Summary
Fields Modifier and Type Field Description java.lang.StringchannelThe channel the push notification subscription is for.java.lang.StringclientIdThe ID of the client the device, or devices are associated to.java.lang.StringdeviceIdThe unique ID of the device.protected static HttpCore.BodyHandler<PushBase.ChannelSubscription>httpBodyHandlerprotected static HttpCore.ResponseHandler<PushBase.ChannelSubscription>httpResponseHandler -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)static PushBase.ChannelSubscriptionforClientId(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.static PushBase.ChannelSubscriptionforDevice(java.lang.String channel, java.lang.String deviceId)A static factory method to create a PushChannelSubscription object for a channel and single device.static PushBase.ChannelSubscriptionfromJsonObject(com.google.gson.JsonObject o)com.google.gson.JsonObjecttoJsonObject()java.lang.StringtoString()
-
Field Details
-
channel
public final java.lang.String channelThe channel the push notification subscription is for.Spec: PCS4
-
deviceId
public final java.lang.String deviceIdThe unique ID of the device.Spec: PCS2, PCS5, PCS6
-
clientId
public final java.lang.String clientIdThe ID of the client the device, or devices are associated to.Spec: PCS3, PCS6
-
httpResponseHandler
-
httpBodyHandler
-
-
Method Details
-
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.ChannelSubscriptionobject.
-
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.ChannelSubscriptionobject.
-
toJsonObject
public com.google.gson.JsonObject toJsonObject() -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
fromJsonObject
-