Skip to content

Commit 13a8745

Browse files
committed
TcpConnection extends java.io.Closeable
Issue: SPR-12849 (cherry picked from commit 4e28da4)
1 parent 673dac5 commit 13a8745

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

spring-messaging/src/main/java/org/springframework/messaging/tcp/TcpConnection.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,18 +16,19 @@
1616

1717
package org.springframework.messaging.tcp;
1818

19+
import java.io.Closeable;
20+
1921
import org.springframework.messaging.Message;
2022
import org.springframework.util.concurrent.ListenableFuture;
2123

2224
/**
2325
* A contract for sending messages and managing a TCP connection.
2426
*
25-
* @param <P> the type of payload for outbound {@link Message}s
26-
*
2727
* @author Rossen Stoyanchev
2828
* @since 4.0
29+
* @param <P> the type of payload for outbound {@link Message}s
2930
*/
30-
public interface TcpConnection<P> {
31+
public interface TcpConnection<P> extends Closeable {
3132

3233
/**
3334
* Send the given message.
@@ -54,6 +55,7 @@ public interface TcpConnection<P> {
5455
/**
5556
* Close the connection.
5657
*/
58+
@Override
5759
void close();
5860

5961
}

0 commit comments

Comments
 (0)