Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 76862 invoked from network); 3 Sep 2010 04:09:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Sep 2010 04:09:51 -0000 Received: (qmail 24547 invoked by uid 500); 3 Sep 2010 04:09:50 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 24097 invoked by uid 500); 3 Sep 2010 04:09:48 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 24084 invoked by uid 99); 3 Sep 2010 04:09:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 04:09:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,T_FRT_STOCK2 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 04:09:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C9D92238899C; Fri, 3 Sep 2010 04:09:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r992194 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Date: Fri, 03 Sep 2010 04:09:25 -0000 To: dev@tomcat.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100903040925.C9D92238899C@eris.apache.org> Author: mturk Date: Fri Sep 3 04:09:25 2010 New Revision: 992194 URL: http://svn.apache.org/viewvc?rev=992194&view=rev Log: Trim trailing spaces. No functional change Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=992194&r1=992193&r2=992194&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Sep 3 04:09:25 2010 @@ -91,7 +91,7 @@ public class AprEndpoint extends Abstrac */ protected long sslContext = 0; - + // ------------------------------------------------------------- Properties @@ -101,7 +101,7 @@ public class AprEndpoint extends Abstrac protected boolean deferAccept = true; public void setDeferAccept(boolean deferAccept) { this.deferAccept = deferAccept; } public boolean getDeferAccept() { return deferAccept; } - + /** * Size of the socket poller. @@ -340,7 +340,7 @@ public class AprEndpoint extends Abstrac if (sendfiles == null) { return 0; } - + int sendfileCount = 0; for (int i = 0; i < sendfiles.length; i++) { sendfileCount += sendfiles[i].getSendfileCount(); @@ -445,7 +445,7 @@ public class AprEndpoint extends Abstrac sendfileThreadCount = 1; } } - + // Delay accepting of new connections until data is available // Only Linux kernels 2.4 + have that implemented // on other platforms this call is noop and will return APR_ENOTIMPL. @@ -457,7 +457,7 @@ public class AprEndpoint extends Abstrac // Initialize SSL if needed if (isSSLEnabled()) { - + // SSL protocol int value = SSL.SSL_PROTOCOL_ALL; if ("SSLv2".equalsIgnoreCase(SSLProtocol)) { @@ -632,7 +632,7 @@ public class AprEndpoint extends Abstrac } } } - } + } /** * Pause the endpoint, which will make it stop accepting new sockets. @@ -711,27 +711,27 @@ public class AprEndpoint extends Abstrac if (running) { stop(); } - + // Destroy pool if it was initialised if (serverSockPool != 0) { Pool.destroy(serverSockPool); serverSockPool = 0; } - + // Close server socket if it was initialised if (serverSock != 0) { Socket.close(serverSock); serverSock = 0; } - + sslContext = 0; - + // Close all APR memory pools and resources if initialised if (rootPool != 0) { Pool.destroy(rootPool); rootPool = 0; } - + initialized = false; } @@ -783,7 +783,7 @@ public class AprEndpoint extends Abstrac } - + /** * Allocate a new poller of the specified size. */ @@ -801,7 +801,7 @@ public class AprEndpoint extends Abstrac } } - + /** * Process given socket. */ @@ -819,7 +819,7 @@ public class AprEndpoint extends Abstrac } return true; } - + /** * Process given socket. @@ -838,7 +838,7 @@ public class AprEndpoint extends Abstrac } return true; } - + /** * Process given socket for an event. @@ -858,7 +858,7 @@ public class AprEndpoint extends Abstrac } else { Thread.currentThread().setContextClassLoader( getClass().getClassLoader()); - } + } getExecutor().execute(proc); } finally { if (IS_SECURITY_ENABLED) { @@ -879,7 +879,7 @@ public class AprEndpoint extends Abstrac } return true; } - + // --------------------------------------------------- Acceptor Inner Class @@ -952,7 +952,7 @@ public class AprEndpoint extends Abstrac protected long[] addS; protected volatile int addCount = 0; - + protected boolean comet = true; protected volatile int keepAliveCount = 0; @@ -961,7 +961,7 @@ public class AprEndpoint extends Abstrac public Poller(boolean comet) { this.comet = comet; } - + /** * Create the poller. With some versions of APR, the maximum poller size will * be 62 (recompiling APR is necessary to remove this limitation). @@ -1111,7 +1111,7 @@ public class AprEndpoint extends Abstrac // Check for failed sockets and hand this socket off to a worker if (((desc[n*2] & Poll.APR_POLLHUP) == Poll.APR_POLLHUP) || ((desc[n*2] & Poll.APR_POLLERR) == Poll.APR_POLLERR) - || (comet && (!processSocket(desc[n*2+1], SocketStatus.OPEN))) + || (comet && (!processSocket(desc[n*2+1], SocketStatus.OPEN))) || (!comet && (!processSocket(desc[n*2+1])))) { // Close socket and clear pool if (comet) { @@ -1164,7 +1164,7 @@ public class AprEndpoint extends Abstrac } } - + } @@ -1208,7 +1208,7 @@ public class AprEndpoint extends Abstrac protected long pool = 0; protected long[] desc; protected HashMap sendfileData; - + protected volatile int sendfileCount; public int getSendfileCount() { return sendfileCount; } @@ -1507,9 +1507,9 @@ public class AprEndpoint extends Abstrac * and do the handshake. */ protected class SocketWithOptionsProcessor implements Runnable { - + protected long socket = 0; - + public SocketWithOptionsProcessor(long socket) { this.socket = socket; } @@ -1526,7 +1526,7 @@ public class AprEndpoint extends Abstrac } } else { // Process the request from this socket - if (!setSocketOptions(socket) + if (!setSocketOptions(socket) || handler.process(socket) == Handler.SocketState.CLOSED) { // Close socket and pool Socket.destroy(socket); @@ -1535,10 +1535,10 @@ public class AprEndpoint extends Abstrac } } - + } - - + + // ---------------------------------------------- SocketProcessor Inner Class @@ -1547,11 +1547,11 @@ public class AprEndpoint extends Abstrac * external Executor thread pool. */ protected class SocketProcessor implements Runnable { - + protected long socket = 0; protected boolean async = false; protected SocketStatus status = SocketStatus.ERROR; - + public SocketProcessor(long socket) { this.socket = socket; this.async = false; @@ -1573,10 +1573,10 @@ public class AprEndpoint extends Abstrac } } - + } - - + + // --------------------------------------- SocketEventProcessor Inner Class @@ -1585,10 +1585,10 @@ public class AprEndpoint extends Abstrac * external Executor thread pool. */ protected class SocketEventProcessor implements Runnable { - + protected long socket = 0; - protected SocketStatus status = null; - + protected SocketStatus status = null; + public SocketEventProcessor(long socket, SocketStatus status) { this.socket = socket; this.status = status; @@ -1604,9 +1604,9 @@ public class AprEndpoint extends Abstrac } } - + } - + private static class PrivilegedSetTccl implements PrivilegedAction { private ClassLoader cl; @@ -1619,5 +1619,5 @@ public class AprEndpoint extends Abstrac Thread.currentThread().setContextClassLoader(cl); return null; } - } + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org