8000 Revert "implements java.io.Closeable" · ftt1024/rabbitmq-java-client@6d611d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6d611d7

Browse files
Revert "implements java.io.Closeable"
This reverts commit fd27f27. It conflicts with a recently merged timeout exception change.
1 parent a2fc402 commit 6d611d7

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

src/com/rabbitmq/client/Channel.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.rabbitmq.client;
1818

19-
import java.io.Closeable;
2019
import java.io.IOException;
2120
import java.util.Map;
2221
import java.util.concurrent.TimeoutException;
@@ -59,7 +58,7 @@
5958
*
6059
*/
6160

62-
public interface Channel extends ShutdownNotifier, Closeable {
61+
public interface Channel extends ShutdownNotifier {
6362
/**
6463
* Retrieve this channel's channel number.
6564
* @return the channel number
@@ -78,7 +77,6 @@ public interface Channel extends ShutdownNotifier, Closeable {
7877
*
7978
* @throws java.io.IOException if an error is encountered
8079
*/
81-
@Override
8280
void close() throws IOException, TimeoutException;
8381

8482
/**

src/com/rabbitmq/client/Connection.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.rabbitmq.client;
1818

19-
import java.io.Closeable;
2019
import java.io.IOException;
2120
import java.net.InetAddress;
2221
import java.util.Map;
@@ -51,7 +50,7 @@
5150
* Current implementations are thread-safe for code at the client API level,
5251
* and in fact thread-safe internally except for code within RPC calls.
5352
*/
54-
public interface Connection extends ShutdownNotifier, Closeable { // rename to AMQPConnection later, this is a temporary name
53+
public interface Connection extends ShutdownNotifier { // rename to AMQPConnection later, this is a temporary name
5554
/**
5655
* Retrieve the host.
5756
* @return the hostname of the peer we're connected to.
@@ -124,7 +123,6 @@ public interface Connection extends ShutdownNotifier, Closeable { // rename to A
124123
*
125124
* @throws IOException if an I/O problem is encountered
126125
*/
127-
@Override
128126
void close() throws IOException;
129127

130128
/**

src/com/rabbitmq/client/RpcClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import java.io.ByteArrayInputStream;
2121
import java.io.ByteArrayOutputStream;
22-
import java.io.Closeable;
2322
import java.io.DataInputStream;
2423
import java.io.DataOutputStream;
2524
import java.io.EOFException;
@@ -42,7 +41,7 @@
4241
* It simply provides a mechanism for sending a message to an exchange with a given routing key,
4342
* and waiting for a response.
4443
*/
45-
public class RpcClient extends Closeable {
44+
public class RpcClient {
4645
/** Channel we are communicating on */
4746
private final Channel _channel;
4847
/** Exchange to send requests to */
@@ -114,7 +113,6 @@ public void checkConsumer() throws IOException {
114113
* Public API - cancels the consumer, thus deleting the temporary queue, and marks the RpcClient as closed.
115114
* @throws IOException if an error is encountered
116115
*/
117-
@Override
118116
public void close() throws IOException {
119117
if (_consumer != null) {
120118
_channel.basicCancel(_consumer.getConsumerTag());

src/com/rabbitmq/client/RpcServer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717

1818
package com.rabbitmq.client;
1919

20-
import java.io.Closeable;
2120
import java.io.IOException;
2221

2322
/**
2423
* Class which manages a request queue for a simple RPC-style service.
2524
* The class is agnostic about the format of RPC arguments / return values.
2625
*/
27-
public class RpcServer extends Closeable {
26+
public class RpcServer {
2827
/** Channel we are communicating on */
2928
private final Channel _channel;
3029
/** Queue to receive requests from */
@@ -67,7 +66,6 @@ public RpcServer(Channel channel, String queueName)
6766
* it was a temporary queue, and marks the RpcServer as closed.
6867
* @throws IOException if an error is encountered
6968
*/
70-
@Override
7169
public void close()
7270
throws IOException
7371
{

0 commit comments

Comments
 (0)
0