From: remm Date: Fri, 28 Apr 2006 13:19:23 +0000 (+0000) Subject: - Harmonize a bit more (the java.io HTTP 1.1 is the template: in the comments for... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a55cf87bfbe0507ada74ff9130ddb6f2a0368817;p=tomcat7.0 - Harmonize a bit more (the java.io HTTP 1.1 is the template: in the comments for the methods, "*" means this method should be common to all protocols, and "HTTP" means the method should be common to all HTTP protocols). git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@397894 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11AprProtocol.java b/java/org/apache/coyote/http11/Http11AprProtocol.java index 8c71250e5..0f037d873 100644 --- a/java/org/apache/coyote/http11/Http11AprProtocol.java +++ b/java/org/apache/coyote/http11/Http11AprProtocol.java @@ -20,6 +20,7 @@ import java.net.InetAddress; import java.net.URLEncoder; import java.util.Hashtable; import java.util.Iterator; +import java.util.concurrent.Executor; import javax.management.MBeanRegistration; import javax.management.MBeanServer; @@ -212,6 +213,16 @@ public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration // -------------------- Pool setup -------------------- + // * + public Executor getExecutor() { + return ep.getExecutor(); + } + + // * + public void setExecutor(Executor executor) { + ep.setExecutor(executor); + } + public int getMaxThreads() { return ep.getMaxThreads(); } diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index ad52794b2..73e5a99e5 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -17,9 +17,7 @@ package org.apache.coyote.http11; import java.io.IOException; -import java.io.InputStream; import java.io.InterruptedIOException; -import java.io.OutputStream; import java.net.InetAddress; import java.net.Socket; import java.security.AccessController; @@ -31,7 +29,6 @@ import java.util.regex.PatternSyntaxException; import org.apache.coyote.ActionCode; import org.apache.coyote.ActionHook; import org.apache.coyote.Adapter; -import org.apache.coyote.Processor; import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; @@ -61,7 +58,7 @@ import org.apache.tomcat.util.threads.ThreadWithAttributes; * * @author Remy Maucherat */ -public class Http11Processor implements Processor, ActionHook { +public class Http11Processor implements ActionHook { /** @@ -650,14 +647,6 @@ public class Http11Processor implements Processor, ActionHook { /** - * Set the socket associated with this HTTP connection. - */ - public void setSocket(Socket socket) - throws IOException { - this.socket = socket; - } - - /** * Set the flag to control upload time-outs. */ public void setDisableUploadTimeout(boolean isDisabled) { @@ -737,7 +726,7 @@ public class Http11Processor implements Processor, ActionHook { * responses * @throws IOException error during an I/O operation */ - public void process(InputStream input, OutputStream output) + public void process(Socket socket) throws IOException { ThreadWithAttributes thrA= (ThreadWithAttributes)Thread.currentThread(); @@ -754,8 +743,9 @@ public class Http11Processor implements Processor, ActionHook { localPort = -1; // Setting up the I/O - inputBuffer.setInputStream(input); - outputBuffer.setOutputStream(output); + this.socket = socket; + inputBuffer.setInputStream(socket.getInputStream()); + outputBuffer.setOutputStream(socket.getOutputStream()); // Error flag error = false; diff --git a/java/org/apache/coyote/http11/Http11Protocol.java b/java/org/apache/coyote/http11/Http11Protocol.java index a4c83737f..d03484a16 100644 --- a/java/org/apache/coyote/http11/Http11Protocol.java +++ b/java/org/apache/coyote/http11/Http11Protocol.java @@ -36,7 +36,6 @@ import org.apache.coyote.RequestInfo; import org.apache.tomcat.util.modeler.Registry; import org.apache.tomcat.util.net.JIoEndpoint; import org.apache.tomcat.util.net.SSLImplementation; -import org.apache.tomcat.util.net.SSLSupport; import org.apache.tomcat.util.net.ServerSocketFactory; import org.apache.tomcat.util.net.JIoEndpoint.Handler; import org.apache.tomcat.util.res.StringManager; @@ -604,8 +603,7 @@ public class Http11Protocol processor.setSSLSupport(null); } - processor.setSocket(socket); - processor.process(socket.getInputStream(), socket.getOutputStream()); + processor.process(socket); return false; } catch(java.net.SocketException e) {