billbarker 02/03/16 21:26:20 Modified: coyote/src/java/org/apache/coyote/tomcat3 CoyoteProcessor.java CoyoteRequest.java CoyoteResponse.java Log: Comment changes only. No functional changes. Revision Changes Path 1.5 +23 -0 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteProcessor.java Index: CoyoteProcessor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteProcessor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CoyoteProcessor.java 16 Mar 2002 04:47:30 -0000 1.4 +++ CoyoteProcessor.java 17 Mar 2002 05:26:20 -0000 1.5 @@ -75,6 +75,13 @@ import org.apache.coyote.Adapter; import org.apache.coyote.Processor; +/** Per-Thread Adapter between Coyote and Tomcat. + * This class handles the task of passing of an individual request to + * Tomcat to handle. Also some of the connection-specific methods are + * delegated to here. + * @Author Bill Barker + */ + class CoyoteProcessor implements Adapter { private CoyoteRequest reqA; private CoyoteResponse resA; @@ -90,18 +97,31 @@ cm.initRequest( reqA, resA ); } + /** Release resources. + */ public void recycle() { secure = false; sslImplementation=null; sslSupport=null; } + /** Set the configured SSLImplementation. + * @param ssl The SSL Implementation instance. + */ public void setSSLImplementation(SSLImplementation ssl) { sslImplementation = ssl; } + + /** Set the SSL flag. + * @param isSecure Is this a secure connection. + */ public void setSecure(boolean isSecure) { secure = isSecure; } + + /** Set the per-socket properties. + * @param socket The socket that this Thread is using. + */ public void setSocket(Socket socket) { reqA.setSocket(socket); if( secure ) { @@ -110,6 +130,9 @@ sslSupport = sslImplementation.getSSLSupport(socket); } } + + /** Pass off an individual request to Tomcat. + */ public void service(org.apache.coyote.Request request, org.apache.coyote.Response response) throws Exception{ 1.7 +20 -1 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteRequest.java Index: CoyoteRequest.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteRequest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CoyoteRequest.java 16 Mar 2002 05:03:03 -0000 1.6 +++ CoyoteRequest.java 17 Mar 2002 05:26:20 -0000 1.7 @@ -75,6 +75,11 @@ import org.apache.coyote.Adapter; import org.apache.coyote.Processor; +/** The Request to connect with Coyote. + * This class handles the I/O requirements and transferring the request + * line and Mime headers between Coyote and Tomcat. + * @Author Bill Barker + */ class CoyoteRequest extends Request { org.apache.coyote.Request coyoteRequest=null; @@ -104,6 +109,10 @@ end=-1; } + /** Attach the Coyote Request to this Request. + * This is currently set pre-request to allow copying the request + * attributes to the Tomcat attributes. + */ public void setCoyoteRequest(org.apache.coyote.Request cReq) { coyoteRequest=cReq; // This is really ugly, but fast. @@ -125,11 +134,14 @@ scookies.setHeaders(headers); params.setHeaders(headers); } - + /** Set the socket for this request. + */ public void setSocket(Socket socket) { this.socket = socket; } + /** Read a single character from the request body. + */ public int doRead() throws IOException { if( available == 0 ) return -1; @@ -144,6 +156,8 @@ return readBuffer[pos++] & 0xFF; } + /** Read a chunk from the request body. + */ public int doRead(byte[] b, int off, int len) throws IOException { if( available == 0 ) return -1; @@ -183,6 +197,9 @@ } + /** Determine the local virual host and port from the <code>host</code> + * header. + */ protected void parseHostHeader() { MessageBytes hH=getMimeHeaders().getValue("host"); serverPort = socket.getLocalPort(); @@ -243,6 +260,8 @@ return serverPort; } + /** Define the SSL Support support instance for this socket. + */ void setSSLSupport(SSLSupport s){ sslSupport=s; } 1.4 +6 -1 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteResponse.java Index: CoyoteResponse.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteResponse.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CoyoteResponse.java 12 Mar 2002 05:31:33 -0000 1.3 +++ CoyoteResponse.java 17 Mar 2002 05:26:20 -0000 1.4 @@ -74,7 +74,10 @@ import org.apache.tomcat.util.compat.*; - +/** The Response to connect with Coyote. + * This class mostly handles the I/O between Tomcat and Coyte. + * @Author Bill Barker + */ class CoyoteResponse extends Response { String reportedname=null; @@ -85,6 +88,8 @@ super(); } + /** Attach a Coyote Request to this request. + */ public void setCoyoteResponse(org.apache.coyote.Response cRes) { coyoteResponse = cRes; headers = coyoteResponse.getMimeHeaders();
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>