tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1042681 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11Protocol.java
Date Mon, 06 Dec 2010 15:43:52 GMT
Author: markt
Date: Mon Dec  6 15:43:52 2010
New Revision: 1042681

URL: http://svn.apache.org/viewvc?rev=1042681&view=rev
Log:
Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Pull up more getters/setters.

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042681&r1=1042680&r2=1042681&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 15:43:52 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.coyote;
 
+import java.net.InetAddress;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.concurrent.Executor;
@@ -145,6 +146,19 @@ public abstract class AbstractProtocolHa
     public Adapter getAdapter() { return adapter; }
 
 
+    /**
+     * The maximum number of idle processors that will be retained in the cache
+     * and re-used with a subsequent request. The default is -1, unlimited,
+     * although in that case there will never be more Processor objects than
+     * there are threads in the associated thread pool.
+     */
+    protected int processorCache = -1;
+    public int getProcessorCache() { return this.processorCache; }
+    public void setProcessorCache(int processorCache) {
+        this.processorCache = processorCache;
+    }
+
+
     // ---------------------- Properties that are passed through to the EndPoint
 
     @Override
@@ -190,11 +204,16 @@ public abstract class AbstractProtocolHa
     public void setSoLinger(int soLinger) { endpoint.setSoLinger(soLinger); }
 
 
-    // ------------------------ Properties that are made available as attributes
-    // -------------------------------------(and passed through to the EndPoint)
+    // ---------------------- Properties that are passed through to the EndPoint
+    // ------------------------------------ and are made available as attributes
+
+    public InetAddress getAddress() { return endpoint.getAddress(); }
+    public void setAddress(InetAddress ia) {
+        endpoint.setAddress( ia );
+        setAttribute("address", "" + ia);
+    }
+
 
-    
-    
     // -------------------------------------------------------- Abstract methods
     /**
      * Concrete implementations need to provide access to their logger to be

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1042681&r1=1042680&r2=1042681&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 15:43:52 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.coyote.ajp;
 
-import java.net.InetAddress;
 import java.net.URLEncoder;
 
 import javax.management.MBeanServer;
@@ -91,17 +90,6 @@ public abstract class AbstractAjpProtoco
         return ("ajp-" + encodedAddr + endpoint.getPort());
     }
 
-    /**
-     * Processor cache.
-     */
-    protected int processorCache = -1;
-    public int getProcessorCache() { return this.processorCache; }
-    public void setProcessorCache(int processorCache) { this.processorCache = processorCache;
}
-
-
-    public InetAddress getAddress() { return endpoint.getAddress(); }
-    public void setAddress(InetAddress ia) { endpoint.setAddress(ia); }
-
     public int getSoTimeout() { return endpoint.getSoTimeout(); }
     public void setSoTimeout(int soTimeout) { endpoint.setSoTimeout(soTimeout); }
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1042681&r1=1042680&r2=1042681&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon Dec  6 15:43:52
2010
@@ -16,7 +16,6 @@
  */
 package org.apache.coyote.http11;
 
-import java.net.InetAddress;
 import java.net.URLEncoder;
 
 import javax.management.MBeanServer;
@@ -36,12 +35,6 @@ public abstract class AbstractHttp11Prot
     protected SSLImplementation sslImplementation = null;
     
     
-    public InetAddress getAddress() { return endpoint.getAddress(); }
-    public void setAddress(InetAddress ia) {
-        endpoint.setAddress( ia );
-        setAttribute("address", "" + ia);
-    }
-    
     public String getName() {
         String encodedAddr = "";
         if (getAddress() != null) {
@@ -115,12 +108,6 @@ public abstract class AbstractHttp11Prot
         setAttribute("secure", "" + b);
     }
     
-    /**
-     * Processor cache.
-     */
-    private int processorCache;
-    public int getProcessorCache() { return this.processorCache; }
-    public void setProcessorCache(int processorCache) { this.processorCache = processorCache;
}
 
     private int socketBuffer = 9000;
     public int getSocketBuffer() { return socketBuffer; }



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


Mime
View raw message