From 484414ebd425e06dca269f173e64b19d9b8890bc Mon Sep 17 00:00:00 2001 From: Karl Andersson Date: Sat, 6 Feb 2016 16:31:45 +0100 Subject: [PATCH] Added Closable-inteface to Connection-class for future try-with-resource support in JDK7 (automatic on compile with JDK7) --- src/main/java/com/rabbitmq/client/Connection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rabbitmq/client/Connection.java b/src/main/java/com/rabbitmq/client/Connection.java index e733ce957a..203ae7d73d 100644 --- a/src/main/java/com/rabbitmq/client/Connection.java +++ b/src/main/java/com/rabbitmq/client/Connection.java @@ -16,6 +16,7 @@ package com.rabbitmq.client; +import java.io.Closeable; import java.io.IOException; import java.net.InetAddress; import java.util.Map; @@ -50,7 +51,7 @@ * Current implementations are thread-safe for code at the client API level, * and in fact thread-safe internally except for code within RPC calls. */ -public interface Connection extends ShutdownNotifier { // rename to AMQPConnection later, this is a temporary name +public interface Connection extends ShutdownNotifier, Closeable { // rename to AMQPConnection later, this is a temporary name /** * Retrieve the host. * @return the hostname of the peer we're connected to.