From 4e28da439d9a5a8880318960124b4196fe6d275f Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 25 Mar 2015 00:42:14 +0100 Subject: [PATCH] TcpConnection extends java.io.Closeable Issue: SPR-12849 --- .../springframework/messaging/tcp/TcpConnection.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java b/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java index 644af3b5eb3..e7f59252d57 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,18 +16,19 @@ package org.springframework.messaging.tcp; +import java.io.Closeable; + import org.springframework.messaging.Message; import org.springframework.util.concurrent.ListenableFuture; /** * A contract for sending messages and managing a TCP connection. * - * @param

the type of payload for outbound {@link Message}s - * * @author Rossen Stoyanchev * @since 4.0 + * @param

the type of payload for outbound {@link Message}s */ -public interface TcpConnection

{ +public interface TcpConnection

extends Closeable { /** * Send the given message. @@ -54,6 +55,7 @@ public interface TcpConnection

{ /** * Close the connection. */ + @Override void close(); }