Author: markt
Date: Sun Sep 26 22:37:31 2010
New Revision: 1001545
URL: http://svn.apache.org/viewvc?rev=1001545&view=rev
Log:
Add some Javadoc.
Use SocketStatus.OPEN rather than STOP since the BIO connector treats them the
same way and it reduces code complexity. It also simplifies async re-factoring
I have in the works,
Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1001545&r1=1001544&r2=1001545&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Sun Sep 26
22:37:31 2010
@@ -660,7 +660,7 @@ public class AjpProcessor implements Act
RequestInfo rp = request.getRequestProcessor();
if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE )
{ //async handling
dispatch.set(true);
- endpoint.processSocket(this.socket, SocketStatus.STOP);
+ endpoint.processSocket(this.socket, SocketStatus.OPEN);
} else {
dispatch.set(false);
}
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1001545&r1=1001544&r2=1001545&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Sun Sep 26
22:37:31 2010
@@ -502,7 +502,7 @@ public class Http11Processor extends Abs
RequestInfo rp = request.getRequestProcessor();
if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE )
{ //async handling
dispatch.set(true);
- endpoint.processSocket(this.socket, SocketStatus.STOP);
+ endpoint.processSocket(this.socket, SocketStatus.OPEN);
} else {
dispatch.set(false);
}
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1001545&r1=1001544&r2=1001545&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Sun Sep 26
22:37:31 2010
@@ -524,9 +524,23 @@ public class JIoEndpoint extends Abstrac
}
}
+
+ /**
+ * Process an existing async connection. If processing is required, passes
+ * the wrapped socket to an executor for processing.
+ *
+ * @param socket The socket associated with the client.
+ * @param status Only OPEN and TIMEOUT are used. The others are used for
+ * Comet requests that are not supported by the BIO (JIO)
+ * Connector.
+ * @return <code>true</code> if the socket is passed to the
+ * executor, <code>false</code> if something went wrong.
+ * Returning <code>false</code> is an indication to close
+ * the socket immediately.
+ */
public boolean processSocket(SocketWrapper<Socket> socket, SocketStatus
status) {
try {
- if (status == SocketStatus.OPEN || status == SocketStatus.STOP ||
status == SocketStatus.TIMEOUT) {
+ if (status == SocketStatus.OPEN || status == SocketStatus.TIMEOUT)
{
if (waitingRequests.remove(socket)) {
SocketProcessor proc = new SocketProcessor(socket,status);
ClassLoader loader =
Thread.currentThread().getContextClassLoader();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]