TcpConnection extends java.io.Closeable

Issue: SPR-12849
This commit is contained in:
Juergen Hoeller 2015-03-25 00:42:14 +01:00
parent 935ffc5827
commit 4e28da439d
1 changed files with 6 additions and 4 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -16,18 +16,19 @@
package org.springframework.messaging.tcp; package org.springframework.messaging.tcp;
import java.io.Closeable;
import org.springframework.messaging.Message; import org.springframework.messaging.Message;
import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFuture;
/** /**
* A contract for sending messages and managing a TCP connection. * A contract for sending messages and managing a TCP connection.
* *
* @param <P> the type of payload for outbound {@link Message}s
*
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 4.0 * @since 4.0
* @param <P> the type of payload for outbound {@link Message}s
*/ */
public interface TcpConnection<P> { public interface TcpConnection<P> extends Closeable {
/** /**
* Send the given message. * Send the given message.
@ -54,6 +55,7 @@ public interface TcpConnection<P> {
/** /**
* Close the connection. * Close the connection.
*/ */
@Override
void close(); void close();
} }