Remove unused code.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 21 Feb 2009 12:00:00 +0000 (12:00 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 21 Feb 2009 12:00:00 +0000 (12:00 +0000)
Deprecate NOOP method

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

java/org/apache/coyote/http11/Http11AprProtocol.java
java/org/apache/coyote/http11/Http11NioProtocol.java
java/org/apache/coyote/http11/Http11Protocol.java

index 0b4aeab..a17ba16 100644 (file)
@@ -32,7 +32,6 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.ActionCode;
-import org.apache.coyote.ActionHook;
 import org.apache.coyote.Adapter;
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.RequestGroupInfo;
@@ -567,9 +566,7 @@ public class Http11AprProtocol implements ProtocolHandler, MBeanRegistration {
                     processor = createProcessor();
                 }
 
-                if (processor instanceof ActionHook) {
-                    ((ActionHook) processor).action(ActionCode.ACTION_START, null);
-                }
+                processor.action(ActionCode.ACTION_START, null);
 
                 SocketState state = processor.process(socket);
                 if (state == SocketState.LONG) {
index 4b0498e..8a91c1e 100644 (file)
@@ -31,7 +31,6 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.ActionCode;
-import org.apache.coyote.ActionHook;
 import org.apache.coyote.Adapter;
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.RequestGroupInfo;
@@ -262,6 +261,11 @@ public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration
         ep.setExecutor(executor);
     }
     
+    /**
+     * NOOP.
+     * @param useexec - Ignored
+     * @deprecated Executors are always used for NIO
+     */
     public void setUseExecutor(boolean useexec) {
         ep.setUseExecutor(useexec);
     }
@@ -733,10 +737,7 @@ public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration
                     processor = createProcessor();
                 }
 
-                if (processor instanceof ActionHook) {
-                    ((ActionHook) processor).action(ActionCode.ACTION_START, null);
-                }
-                
+                processor.action(ActionCode.ACTION_START, null);
                 
                 if (proto.ep.getSecure() && (proto.sslImplementation != null)) {
                     if (socket instanceof SecureNioChannel) {
index 784597a..286acbf 100644 (file)
@@ -32,7 +32,6 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.ActionCode;
-import org.apache.coyote.ActionHook;
 import org.apache.coyote.Adapter;
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.RequestGroupInfo;
@@ -573,9 +572,7 @@ public class Http11Protocol
                     processor = createProcessor();
                 }
 
-                if (processor instanceof ActionHook) {
-                    ((ActionHook) processor).action(ActionCode.ACTION_START, null);
-                }
+                processor.action(ActionCode.ACTION_START, null);
 
                 if (proto.secure && (proto.sslImplementation != null)) {
                     processor.setSSLSupport
@@ -611,9 +608,7 @@ public class Http11Protocol
                 //       if(proto.adapter != null) proto.adapter.recycle();
                 //                processor.recycle();
 
-                if (processor instanceof ActionHook) {
-                    ((ActionHook) processor).action(ActionCode.ACTION_STOP, null);
-                }
+                processor.action(ActionCode.ACTION_STOP, null);
                 recycledProcessors.offer(processor);
             }
             return false;