Package io.ably.lib.rest
Class AblyRest
java.lang.Object
io.ably.lib.rest.AblyBase
io.ably.lib.rest.AblyRest
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
AblyRealtime
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.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AblyRest(ClientOptions options)Construct a client object using an AblyClientOptionsobject.AblyRest(java.lang.String key)Constructs a client object using an Ably API key or token string. -
Method Summary
Methods inherited from class io.ably.lib.rest.AblyBase
close, onAuthError, onAuthUpdated, onAuthUpdatedAsync, onClientIdSet, publishBatch, publishBatch, publishBatchAsync, publishBatchAsync, request, requestAsync, stats, statsAsync, time, timeAsync
-
Constructor Details
-
AblyRest
Constructs a client object using an Ably API key or token string.Spec: RSC1
- Parameters:
key- The Ably API key or token string used to validate the client.- Throws:
AblyException
-
AblyRest
Construct a client object using an AblyClientOptionsobject.Spec: RSC1
- Parameters:
options- AClientOptionsobject to configure the client connection to Ably.- Throws:
AblyException
-