Package io.ably.lib.rest

Class AblyRest

java.lang.Object
io.ably.lib.rest.AblyBase
io.ably.lib.rest.AblyRest
All Implemented Interfaces:
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.
  • Constructor Details

    • AblyRest

      public AblyRest(String key) throws AblyException
      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

      public AblyRest(ClientOptions options) throws AblyException
      Construct a client object using an Ably ClientOptions object.

      Spec: RSC1

      Parameters:
      options - A ClientOptions object to configure the client connection to Ably.
      Throws:
      AblyException