You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/01/28 20:30:13 UTC

svn commit: r1655439 - in /tomcat/trunk/java/org/apache: coyote/ajp/AjpNioProtocol.java coyote/http11/Http11NioProtocol.java tomcat/util/net/NioEndpoint.java

Author: markt
Date: Wed Jan 28 19:30:12 2015
New Revision: 1655439

URL: http://svn.apache.org/r1655439
Log:
Simplify. Do read registrations via the SocketWrapper rather than
directly with the Socket & Poller.

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java?rev=1655439&r1=1655438&r2=1655439&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProtocol.java Wed Jan 28 19:30:12 2015
@@ -128,7 +128,7 @@ public class AjpNioProtocol extends Abst
             processor.recycle();
             recycledProcessors.push(processor);
             if (addToPoller) {
-                socket.getSocket().getPoller().add(socket.getSocket());
+                socket.registerReadInterest();
             }
         }
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1655439&r1=1655438&r2=1655439&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Wed Jan 28 19:30:12 2015
@@ -210,7 +210,7 @@ public class Http11NioProtocol extends A
             processor.recycle();
             recycledProcessors.push(processor);
             if (addToPoller) {
-                socket.getSocket().getPoller().add(socket.getSocket());
+                socket.registerReadInterest();
             }
         }
 
@@ -242,7 +242,7 @@ public class Http11NioProtocol extends A
                 //  - this is an upgraded connection
                 //  - the request line/headers have not been completely
                 //    read
-                socket.getSocket().getPoller().add(socket.getSocket());
+                socket.registerReadInterest();
             }
         }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1655439&r1=1655438&r2=1655439&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jan 28 19:30:12 2015
@@ -839,11 +839,9 @@ public class NioEndpoint extends Abstrac
          * however).
          *
          * @param socket to add to the poller
+         * @param interestOps Operations for which to register this socket with
+         *                    the Poller
          */
-        public void add(final NioChannel socket) {
-            add(socket,SelectionKey.OP_READ);
-        }
-
         public void add(final NioChannel socket, final int interestOps) {
             PollerEvent r = eventCache.pop();
             if ( r==null) r = new PollerEvent(socket,null,interestOps);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org