tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1137375 - in /tomcat/trunk/java/org/apache/coyote: AbstractProcessor.java ajp/AbstractAjpProcessor.java http11/AbstractHttp11Processor.java http11/Http11AprProcessor.java http11/Http11NioProcessor.java http11/Http11Processor.java
Date Sun, 19 Jun 2011 15:00:40 GMT
Author: markt
Date: Sun Jun 19 15:00:40 2011
New Revision: 1137375

URL: http://svn.apache.org/viewvc?rev=1137375&view=rev
Log:
Pull up common endpoint code in Processor constructors

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java?rev=1137375&r1=1137374&r2=1137375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java Sun Jun 19 15:00:40 2011
@@ -21,15 +21,23 @@ import java.util.concurrent.Executor;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 
 /**
- * Provides attributes common to all support protocols (currently HTTP and AJP).
- * TODO: There are more attributes that can be pulled up
+ * Provides functionality and attributes common to all supported protocols
+ * (currently HTTP and AJP).
  */
 public abstract class AbstractProcessor implements ActionHook, Processor {
 
+    protected AbstractEndpoint endpoint;
+    protected Request request = null;
+    protected Response response = null;
+
+    
+    public AbstractProcessor(AbstractEndpoint endpoint) {
+        this.endpoint = endpoint;
+    }
+
     /**
      * The endpoint receiving connections that are handled by this processor.
      */
-    protected AbstractEndpoint endpoint;
     protected AbstractEndpoint getEndpoint() {
         return endpoint;
     }
@@ -38,18 +46,11 @@ public abstract class AbstractProcessor 
     /**
      * The request associated with this processor.
      */
-    protected Request request = null;
     public Request getRequest() {
         return request;
     }
 
 
-    /**
-     * The response associated with this processor.
-     */
-    protected Response response = null;
-
-
     /*
      * Expose selected endpoint attributes through the processor
      */

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1137375&r1=1137374&r2=1137375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Sun Jun 19 15:00:40
2011
@@ -224,8 +224,10 @@ public abstract class AbstractAjpProcess
     // ------------------------------------------------------------ Constructor
     
     public AbstractAjpProcessor(int packetSize, AbstractEndpoint endpoint) {
+        
+        super(endpoint);
+
         this.packetSize = packetSize;
-        this.endpoint = endpoint;
 
         request = new Request();
         request.setInputBuffer(new SocketInputBuffer());

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1137375&r1=1137374&r2=1137375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Sun Jun 19 15:00:40
2011
@@ -43,6 +43,7 @@ import org.apache.tomcat.util.buf.HexUti
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.MimeHeaders;
+import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.res.StringManager;
 
@@ -224,6 +225,11 @@ public abstract class AbstractHttp11Proc
     protected AsyncStateMachine asyncStateMachine = new AsyncStateMachine(this);
 
 
+    public AbstractHttp11Processor(AbstractEndpoint endpoint) {
+        super(endpoint);
+    }
+
+
     /**
      * Set compression level.
      */

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1137375&r1=1137374&r2=1137375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Sun Jun 19 15:00:40
2011
@@ -68,7 +68,7 @@ public class Http11AprProcessor extends 
     public Http11AprProcessor(int headerBufferSize, AprEndpoint endpoint,
             int maxTrailerSize) {
 
-        this.endpoint = endpoint;
+        super(endpoint);
         
         request = new Request();
         inputBuffer = new InternalAprInputBuffer(request, headerBufferSize);

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1137375&r1=1137374&r2=1137375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Sun Jun 19 15:00:40
2011
@@ -72,7 +72,7 @@ public class Http11NioProcessor extends 
     public Http11NioProcessor(int maxHttpHeaderSize, NioEndpoint endpoint,
             int maxTrailerSize) {
 
-        this.endpoint = endpoint;
+        super(endpoint);
 
         request = new Request();
         inputBuffer = new InternalNioInputBuffer(request, maxHttpHeaderSize);

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=1137375&r1=1137374&r2=1137375&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Sun Jun 19 15:00:40 2011
@@ -63,7 +63,7 @@ public class Http11Processor extends Abs
     public Http11Processor(int headerBufferSize, JIoEndpoint endpoint,
             int maxTrailerSize) {
 
-        this.endpoint = endpoint;
+        super(endpoint);
         
         request = new Request();
         inputBuffer = new InternalInputBuffer(request, headerBufferSize);



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


Mime
View raw message