-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public class AblyRest extends AblyBase
A client that offers a simple stateless API to interact directly with Ably's REST API. This class implements AutoCloseable so you can use it in try-with-resources constructs and have the JDK close it for you.
-
-
Constructor Summary
Constructors Constructor Description AblyRest(String key)Constructs a client object using an Ably API key or token string. AblyRest(ClientOptions options)Construct a client object using an Ably ClientOptions object.
-
Method Summary
Modifier and Type Method Description LocalDevicedevice()Retrieves a LocalDevice object that represents the current state of the device as a target for push notifications. voidsetAndroidContext(Context context)Set the Android Context for this instance -
Methods inherited from class io.ably.lib.rest.AblyBase
close, publishBatch, publishBatch, publishBatchAsync, publishBatchAsync, request, requestAsync, stats, statsAsync, time, timeAsync -
Methods inherited from class java.lang.AutoCloseable
close -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AblyRest
AblyRest(String key)
Constructs a client object using an Ably API key or token string.- Parameters:
key- The Ably API key or token string used to validate the client.
-
AblyRest
AblyRest(ClientOptions options)
Construct a client object using an Ably ClientOptions object.- Parameters:
options- A ClientOptions object to configure the client connection to Ably.
-
-
Method Detail
-
device
LocalDevice device()
Retrieves a LocalDevice object that represents the current state of the device as a target for push notifications.
Spec: RSH8
-
setAndroidContext
void setAndroidContext(Context context)
Set the Android Context for this instance
-
-
-
-