Remove more START/STOP actions and started attribute. They aren't adding anything.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 17 Sep 2010 14:11:03 +0000 (14:11 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 17 Sep 2010 14:11:03 +0000 (14:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@998145 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ActionCode.java
java/org/apache/coyote/ajp/AjpAprProcessor.java
java/org/apache/coyote/ajp/AjpAprProtocol.java
java/org/apache/coyote/ajp/AjpProcessor.java
java/org/apache/coyote/ajp/AjpProtocol.java

index 971877b..043b4dd 100644 (file)
@@ -40,8 +40,6 @@ public enum ActionCode {
 
     CUSTOM,
     RESET,
-    START,
-    STOP,
     WEBAPP,
 
     /**
index b452b51..48f92e1 100644 (file)
@@ -176,12 +176,6 @@ public class AjpAprProcessor implements ActionHook {
 
 
     /**
-     * State flag.
-     */
-    protected boolean started = false;
-
-
-    /**
      * Error flag.
      */
     protected boolean error = false;
@@ -378,7 +372,7 @@ public class AjpAprProcessor implements ActionHook {
         boolean openSocket = true;
         boolean keptAlive = false;
 
-        while (started && !error && !endpoint.isPaused()) {
+        while (!error && !endpoint.isPaused()) {
 
             // Parsing the request header
             try {
@@ -593,14 +587,6 @@ public class AjpAprProcessor implements ActionHook {
                 error = true;
             }
 
-        } else if (actionCode == ActionCode.START) {
-
-            started = true;
-
-        } else if (actionCode == ActionCode.STOP) {
-
-            started = false;
-
         } else if (actionCode == ActionCode.REQ_SSL_ATTRIBUTE ) {
 
             if (!certificates.isNull()) {
index 6dc73af..84396cc 100644 (file)
@@ -396,8 +396,6 @@ public class AjpAprProtocol
                     processor = createProcessor();
                 }
 
-                processor.action(ActionCode.START, null);
-
                 if (processor.process(socket)) {
                     connections.put(Long.valueOf(socket), processor);
                     return SocketState.OPEN;
@@ -427,7 +425,6 @@ public class AjpAprProtocol
                 AjpAprProtocol.log.error
                     (sm.getString("ajpprotocol.proto.error"), e);
             } finally {
-                processor.action(ActionCode.STOP, null);
                 recycledProcessors.offer(processor);
             }
             return SocketState.CLOSED;
index a8709f9..c7c45ba 100644 (file)
@@ -171,12 +171,6 @@ public class AjpProcessor implements ActionHook {
 
 
     /**
-     * State flag.
-     */
-    protected boolean started = false;
-
-
-    /**
      * Error flag.
      */
     protected boolean error = false;
@@ -383,7 +377,7 @@ public class AjpProcessor implements ActionHook {
         // Error flag
         error = false;
 
-        while (started && !error && !endpoint.isPaused()) {
+        while (!error && !endpoint.isPaused()) {
 
             // Parsing the request header
             try {
@@ -596,14 +590,6 @@ public class AjpProcessor implements ActionHook {
                 error = true;
             }
 
-        } else if (actionCode == ActionCode.START) {
-
-            started = true;
-
-        } else if (actionCode == ActionCode.STOP) {
-
-            started = false;
-
         } else if (actionCode == ActionCode.REQ_SSL_ATTRIBUTE ) {
 
             if (!certificates.isNull()) {
index b9430db..f42bb24 100644 (file)
@@ -391,7 +391,6 @@ public class AjpProtocol
                 if (processor == null) {
                     processor = createProcessor();
                 }
-                processor.action(ActionCode.START, null);
 
                 SocketState state = socket.isAsync()?processor.asyncDispatch(status):processor.process(socket);
                 if (state == SocketState.LONG) {
@@ -423,7 +422,6 @@ public class AjpProtocol
                 AjpProtocol.log.error
                     (sm.getString("ajpprotocol.proto.error"), e);
             } finally {
-                processor.action(ActionCode.STOP, null);
                 recycledProcessors.offer(processor);
             }
             return SocketState.CLOSED;