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.ObjectContains 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
All Methods Static Methods Instance Methods Concrete Methods 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 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
-
httpResponseHandler
protected static HttpCore.ResponseHandler<PushBase.ChannelSubscription> httpResponseHandler
-
httpBodyHandler
protected static HttpCore.BodyHandler<PushBase.ChannelSubscription> httpBodyHandler
-
-
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.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
public static PushBase.ChannelSubscription fromJsonObject(com.google.gson.JsonObject o)
-
-