Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
/**
* AblyRealtime
* The top-level class to be instanced for the Ably Realtime library.
*
* 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 AblyRealtime extends AblyRest {
public class AblyRealtime extends AblyRest implements AutoCloseable {

/**
* The {@link Connection} object for this instance.
Expand Down Expand Up @@ -66,6 +69,7 @@ public void connect() {
* The connection can be re-opened by calling
* {@link Connection#connect}.
*/
@Override
public void close() {
connection.close();
}
Expand Down