-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathAblyRest.java
More file actions
35 lines (32 loc) · 1.13 KB
/
Copy pathAblyRest.java
File metadata and controls
35 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package io.ably.lib.rest;
import io.ably.lib.types.AblyException;
import io.ably.lib.types.ClientOptions;
import io.ably.lib.util.JavaPlatformAgentProvider;
/**
* A client that offers a simple stateless API to interact directly with Ably's REST API.
*
* This class implements {@link AutoCloseable} so you can use it in
* try-with-resources constructs and have the JDK close it for you.
*/
public class AblyRest extends AblyBase {
/**
* Constructs a client object using an Ably API key or token string.
* <p>
* Spec: RSC1
* @param key The Ably API key or token string used to validate the client.
* @throws AblyException
*/
public AblyRest(String key) throws AblyException {
super(key, new JavaPlatformAgentProvider());
}
/**
* Construct a client object using an Ably {@link ClientOptions} object.
* <p>
* Spec: RSC1
* @param options A {@link ClientOptions} object to configure the client connection to Ably.
* @throws AblyException
*/
public AblyRest(ClientOptions options) throws AblyException {
super(options, new JavaPlatformAgentProvider());
}
}