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 implementsAutoCloseableso you can use it in try-with-resources constructs and have the JDK close it for you.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.ably.lib.rest.AblyBase
AblyBase.Channels
-
-
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 Detail
-
AblyRest
public AblyRest(java.lang.String key) throws AblyExceptionConstructs 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
public AblyRest(ClientOptions options) throws AblyException
Construct a client object using an AblyClientOptionsobject.Spec: RSC1
- Parameters:
options- AClientOptionsobject to configure the client connection to Ably.- Throws:
AblyException
-
-