diff src/org/eclipse/jetty/server/AsyncHttpConnection.java @ 972:5ee36654b383

simplify AbstractHttpConnection
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 15 Oct 2016 22:42:05 -0600
parents 866f2e801618
children d35b0a3a7a4a
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/AsyncHttpConnection.java	Fri Oct 14 13:06:06 2016 -0600
+++ b/src/org/eclipse/jetty/server/AsyncHttpConnection.java	Sat Oct 15 22:42:05 2016 -0600
@@ -23,10 +23,10 @@
 import org.eclipse.jetty.http.HttpException;
 import org.eclipse.jetty.http.HttpStatus;
 import org.eclipse.jetty.io.AsyncEndPoint;
-import org.eclipse.jetty.io.Connection;
 import org.eclipse.jetty.io.EndPoint;
 import org.eclipse.jetty.io.nio.AsyncConnection;
 import org.eclipse.jetty.io.nio.SelectChannelEndPoint;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -35,7 +35,7 @@
 /** Asychronous Server HTTP connection
  *
  */
-public class AsyncHttpConnection extends AbstractHttpConnection implements AsyncConnection
+public final class AsyncHttpConnection extends AbstractHttpConnection implements AsyncConnection
 {
 	private final static int NO_PROGRESS_INFO = Integer.getInteger("org.mortbay.jetty.NO_PROGRESS_INFO",100);
 	private final static int NO_PROGRESS_CLOSE = Integer.getInteger("org.mortbay.jetty.NO_PROGRESS_CLOSE",200);
@@ -45,10 +45,10 @@
 	private final AsyncEndPoint _asyncEndp;
 	private boolean _readInterested = true;
 
-	public AsyncHttpConnection(Connector connector, EndPoint endpoint, Server server)
+	public AsyncHttpConnection(SelectChannelConnector connector, AsyncEndPoint endpoint)
 	{
-		super(connector,endpoint,server);
-		_asyncEndp=(AsyncEndPoint)endpoint;
+		super(connector,endpoint);
+		_asyncEndp = endpoint;
 	}
 
 	@Override
@@ -155,6 +155,7 @@
 		}
 	}
 
+	@Override
 	public void onInputShutdown() throws IOException
 	{
 		// If we don't have a committed response and we are not suspended
@@ -170,7 +171,7 @@
 	}
 
 	@Override
-	public void reset()
+	protected void reset()
 	{
 		_readInterested = true;
 		LOG.debug("Enabled read interest {}", _endp);
@@ -180,6 +181,6 @@
 	@Override
 	public boolean isSuspended()
 	{
-		return !_readInterested || super.isSuspended();
+		return !_readInterested;
 	}
 }