Connection and NetworkConnector now implements Closeable,

rather than AutoCloseable, since they deal with I/O.
This commit is contained in:
Simone Bordet 2013-11-05 09:41:49 +01:00
parent 6b0269a16d
commit 4024708bbc
2 changed files with 5 additions and 3 deletions

View File

@ -18,6 +18,8 @@
package org.eclipse.jetty.io;
import java.io.Closeable;
import org.eclipse.jetty.util.Callback;
/**
@ -28,7 +30,7 @@ import org.eclipse.jetty.util.Callback;
* and when the {@link EndPoint} signals read readyness, this {@link Connection} can
* read bytes from the network and interpret them.</p>
*/
public interface Connection extends AutoCloseable
public interface Connection extends Closeable
{
public void addListener(Listener listener);

View File

@ -18,12 +18,13 @@
package org.eclipse.jetty.server;
import java.io.Closeable;
import java.io.IOException;
/**
* <p>A {@link Connector} for TCP/IP network connectors</p>
*/
public interface NetworkConnector extends Connector, AutoCloseable
public interface NetworkConnector extends Connector, Closeable
{
/**
* <p>Performs the activities needed to open the network communication
@ -39,7 +40,6 @@ public interface NetworkConnector extends Connector, AutoCloseable
* (for example, to stop accepting network connections).</p>
* Once a connector has been closed, it cannot be opened again without first
* calling {@link #stop()} and it will not be active again until a subsequent call to {@link #start()}
* @throws IOException if this connector cannot be closed
*/
@Override
void close();