Better align AJP connector code
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 17 May 2011 16:52:51 +0000 (16:52 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 17 May 2011 16:52:51 +0000 (16:52 +0000)
Fix some copy/paste errors

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1104403 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpAprProtocol.java
java/org/apache/coyote/ajp/AjpNioProtocol.java
java/org/apache/coyote/ajp/AjpProtocol.java

index e056fee..35788b6 100644 (file)
@@ -70,7 +70,8 @@ public class AjpAprProtocol extends AbstractAjpProtocol {
         setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
         setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
         setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
-        setUseSendfile(Constants.DEFAULT_USE_SENDFILE);
+        // AJP does not use Send File
+        ((AprEndpoint) endpoint).setUseSendfile(false);
     }
 
     
@@ -86,11 +87,6 @@ public class AjpAprProtocol extends AbstractAjpProtocol {
     // --------------------------------------------------------- Public Methods
 
 
-    public boolean getUseSendfile() { return endpoint.getUseSendfile(); }
-    public void setUseSendfile(@SuppressWarnings("unused") boolean useSendfile) {
-        /* No sendfile for AJP */
-    }
-
     public int getPollTime() { return ((AprEndpoint)endpoint).getPollTime(); }
     public void setPollTime(int pollTime) { ((AprEndpoint)endpoint).setPollTime(pollTime); }
 
@@ -120,7 +116,7 @@ public class AjpAprProtocol extends AbstractAjpProtocol {
             new ConcurrentHashMap<SocketWrapper<Long>, AjpAprProcessor>();
 
         protected ConcurrentLinkedQueue<AjpAprProcessor> recycledProcessors = 
-            new ConcurrentLinkedQueue<AjpAprProcessor>() {
+                new ConcurrentLinkedQueue<AjpAprProcessor>() {
             private static final long serialVersionUID = 1L;
             protected AtomicInteger size = new AtomicInteger(0);
             @Override
index 13c3b03..9711659 100644 (file)
@@ -84,13 +84,6 @@ public class AjpNioProtocol extends AbstractAjpProtocol {
     private AjpConnectionHandler cHandler;
 
 
-    // --------------------------------------------------------- Public Methods
-
-
-    // AJP does not use Send File.
-    public boolean getUseSendfile() { return false; }
-
-
     // ----------------------------------------------------- JMX related methods
 
     @Override
@@ -194,7 +187,7 @@ public class AjpNioProtocol extends AbstractAjpProtocol {
         
         /**
          * Use this only if the processor is not available, otherwise use
-         * {@link #release(NioChannel, Http11NioProcessor).
+         * {@link #release(NioChannel, AjpNioProcessor).
          */
         @Override
         public void release(NioChannel socket) {
@@ -232,7 +225,7 @@ public class AjpNioProtocol extends AbstractAjpProtocol {
                     // with "ERROR" level, so it will show up even on
                     // less-than-verbose logs.
                     AjpNioProtocol.log.error
-                        (sm.getString("http11protocol.proto.error"), e);
+                        (sm.getString("ajpprotocol.proto.error"), e);
                 } finally {
                     if (processor.isAsync()) {
                         state = processor.asyncPostProcess();
index 26644e7..bf40caa 100644 (file)
@@ -105,7 +105,7 @@ public class AjpProtocol extends AbstractAjpProtocol {
             new ConcurrentHashMap<SocketWrapper<Socket>, AjpProcessor>();
 
         protected ConcurrentLinkedQueue<AjpProcessor> recycledProcessors = 
-            new ConcurrentLinkedQueue<AjpProcessor>() {
+                new ConcurrentLinkedQueue<AjpProcessor>() {
             private static final long serialVersionUID = 1L;
             protected AtomicInteger size = new AtomicInteger(0);
             @Override