changeset 959:7b94f5b33c64

remove onClose()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 13 Oct 2016 18:53:26 -0600
parents fc521d2f098e
children 3cd4c706a61f
files src/org/eclipse/jetty/io/Connection.java src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java src/org/eclipse/jetty/io/nio/SelectorManager.java src/org/eclipse/jetty/io/nio/SslConnection.java src/org/eclipse/jetty/server/AbstractHttpConnection.java src/org/eclipse/jetty/server/nio/BlockingChannelConnector.java
diffstat 6 files changed, 0 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/Connection.java	Thu Oct 13 18:48:20 2016 -0600
+++ b/src/org/eclipse/jetty/io/Connection.java	Thu Oct 13 18:53:26 2016 -0600
@@ -64,11 +64,6 @@
     boolean isSuspended();
 
     /**
-     * Called after the connection is closed
-     */
-    void onClose();
-
-    /**
      * Called when the connection idle timeout expires
      * @param idleForMs how long the connection has been idle
      * @see #isIdle()
--- a/src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java	Thu Oct 13 18:48:20 2016 -0600
+++ b/src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java	Thu Oct 13 18:53:26 2016 -0600
@@ -78,9 +78,6 @@
 	/** True if a thread has is blocked in {@link #blockWritable(long)} */
 	private boolean _writeBlocked;
 
-	/** true if {@link SelectSet#destroyEndPoint(SelectChannelEndPoint)} has not been called */
-	private boolean _open;
-	
 	private boolean _ishut;
 
 	public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime)
@@ -91,7 +88,6 @@
 		_manager = selectSet.getManager();
 		_selectSet = selectSet;
 		_state = STATE_UNDISPATCHED;
-		_open = true;
 		_key = key;
 	}
 
@@ -408,11 +404,6 @@
 								_key.cancel();
 							}
 
-							if (_open)
-							{
-								_selectSet.destroyEndPoint(this);
-							}
-							_open = false;
 							_key = null;
 						}
 					}
@@ -435,11 +426,6 @@
 			if (_key!=null && _key.isValid())
 				_key.cancel();
 
-			if (_open)
-			{
-				_open = false;
-				_selectSet.destroyEndPoint(this);
-			}
 			_key = null;
 		}
 	}
--- a/src/org/eclipse/jetty/io/nio/SelectorManager.java	Thu Oct 13 18:48:20 2016 -0600
+++ b/src/org/eclipse/jetty/io/nio/SelectorManager.java	Thu Oct 13 18:53:26 2016 -0600
@@ -290,12 +290,6 @@
 			return _now;
 		}
 
-		public void destroyEndPoint(SelectChannelEndPoint endp)
-		{
-			LOG.debug("destroyEndPoint {}",endp);
-			endp.getConnection().onClose();
-		}
-
 		SaneSelector getSelector()
 		{
 			return _selector;
--- a/src/org/eclipse/jetty/io/nio/SslConnection.java	Thu Oct 13 18:48:20 2016 -0600
+++ b/src/org/eclipse/jetty/io/nio/SslConnection.java	Thu Oct 13 18:53:26 2016 -0600
@@ -219,27 +219,16 @@
 		return this;
 	}
 
-	/* ------------------------------------------------------------ */
 	public boolean isIdle()
 	{
 		return false;
 	}
 
-	/* ------------------------------------------------------------ */
 	public boolean isSuspended()
 	{
 		return false;
 	}
 
-	/* ------------------------------------------------------------ */
-	public void onClose()
-	{
-		Connection connection = _sslEndPoint.getConnection();
-		if (connection != null && connection != this)
-			connection.onClose();
-	}
-
-	/* ------------------------------------------------------------ */
 	@Override
 	public void onIdleExpired(long idleForMs)
 	{
@@ -258,13 +247,11 @@
 		}
 	}
 
-	/* ------------------------------------------------------------ */
 	public void onInputShutdown() throws IOException
 	{
 
 	}
 
-	/* ------------------------------------------------------------ */
 	private synchronized boolean process(Buffer toFill, Buffer toFlush) throws IOException
 	{
 		boolean some_progress=false;
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Oct 13 18:48:20 2016 -0600
+++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Oct 13 18:53:26 2016 -0600
@@ -613,7 +613,6 @@
 			_out.reopen();
 	}
 
-	/* ------------------------------------------------------------ */
 	public boolean isIdle()
 	{
 		return _generator.isIdle() && (_parser.isIdle() || _delayedHandling);
@@ -628,25 +627,16 @@
 		return false;
 	}
 
-	/* ------------------------------------------------------------ */
-	public void onClose()
-	{
-		LOG.debug("closed {}",this);
-	}
-
-	/* ------------------------------------------------------------ */
 	public boolean isExpecting100Continues()
 	{
 		return _expect100Continue;
 	}
 
-	/* ------------------------------------------------------------ */
 	public boolean isExpecting102Processing()
 	{
 		return _expect102Processing;
 	}
 
-	/* ------------------------------------------------------------ */
 	public int getMaxIdleTime()
 	{
 		if (_connector.isLowResources() && _endp.getMaxIdleTime()==_connector.getMaxIdleTime())
@@ -656,7 +646,6 @@
 		return _connector.getMaxIdleTime();
 	}
 
-	/* ------------------------------------------------------------ */
 	public String toString()
 	{
 		return String.format("%s,g=%s,p=%s,r=%d",
--- a/src/org/eclipse/jetty/server/nio/BlockingChannelConnector.java	Thu Oct 13 18:48:20 2016 -0600
+++ b/src/org/eclipse/jetty/server/nio/BlockingChannelConnector.java	Thu Oct 13 18:53:26 2016 -0600
@@ -276,7 +276,6 @@
 			}
 			finally
 			{
-				_connection.onClose();
 				_endpoints.remove(this);
 
 				// wait for client to close, but if not, close ourselves.