tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1043441 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java LocalStrings.properties ajp/AjpAprProtocol.java ajp/AjpProtocol.java http11/Http11AprProtocol.java http11/Http11NioProtocol.java http11/Http11Protocol.java
Date Wed, 08 Dec 2010 14:51:10 GMT
Author: markt
Date: Wed Dec  8 14:51:10 2010
New Revision: 1043441

URL: http://svn.apache.org/viewvc?rev=1043441&view=rev
Log:
Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Pull up start()

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
    tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
    tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.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=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec  8 14:51:10 2010
@@ -379,6 +379,21 @@ public abstract class AbstractProtocolHa
 
 
     @Override
+    public void start() throws Exception {
+        if (getLog().isInfoEnabled())
+            getLog().info(sm.getString("abstractProtocolHandler.start",
+                    getName()));
+        try {
+            endpoint.start();
+        } catch (Exception ex) {
+            getLog().error(sm.getString("abstractProtocolHandler.startError",
+                    getName()), ex);
+            throw ex;
+        }
+    }
+
+
+    @Override
     public void pause() throws Exception {
         if(getLog().isInfoEnabled())
             getLog().info(sm.getString("abstractProtocolHandler.pause",

Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec  8 14:51:10 2010
@@ -18,6 +18,8 @@ abstractProtocolHandler.setAttribute=Set
 abstractProtocolHandler.init=Initializing ProtocolHandler [{0}]
 abstractProtocolHandler.initError=Failed to initialize end point associated with ProtocolHandler
[{0}]
 abstractProtocolHandler.mbeanRegistrationFailed=Failed to register MBean [{0}] for ProtocolHandler
[{1}]
+abstractProtocolHandler.start=Starting ProtocolHandler [{0}]
+abstractProtocolHandler.startError=Failed to start end point associated with ProtocolHandler
[{0}]
 abstractProtocolHandler.pause=Pausing ProtocolHandler [{0}]
 abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler
[{0}]
 abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}]

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Wed Dec  8 14:51:10 2010
@@ -86,19 +86,6 @@ public class AjpAprProtocol extends Abst
     // --------------------------------------------------------- Public Methods
 
 
-    @Override
-    public void start() throws Exception {
-        try {
-            endpoint.start();
-        } catch (Exception ex) {
-            log.error(sm.getString("ajpprotocol.endpoint.starterror"), ex);
-            throw ex;
-        }
-        if (log.isInfoEnabled())
-            log.info(sm.getString("ajpprotocol.start", getName()));
-    }
-
-
     public boolean getUseSendfile() { return endpoint.getUseSendfile(); }
     public void setUseSendfile(@SuppressWarnings("unused") boolean useSendfile) {
         /* No sendfile for AJP */

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Wed Dec  8 14:51:10 2010
@@ -83,22 +83,6 @@ public class AjpProtocol extends Abstrac
     private AjpConnectionHandler cHandler;
 
 
-    // --------------------------------------------------------- Public Methods
-
-
-    @Override
-    public void start() throws Exception {
-        try {
-            endpoint.start();
-        } catch (Exception ex) {
-            log.error(sm.getString("ajpprotocol.endpoint.starterror"), ex);
-            throw ex;
-        }
-        if (log.isInfoEnabled())
-            log.info(sm.getString("ajpprotocol.start", getName()));
-    }
-
-
     // --------------------------------------  AjpConnectionHandler Inner Class
 
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Dec  8 14:51:10
2010
@@ -79,18 +79,6 @@ public class Http11AprProtocol extends A
         setProcessorCache(-1);
     }
 
-    @Override
-    public void start() throws Exception {
-        try {
-            endpoint.start();
-        } catch (Exception ex) {
-            log.error(sm.getString("http11protocol.endpoint.starterror"), ex);
-            throw ex;
-        }
-        if(log.isInfoEnabled())
-            log.info(sm.getString("http11protocol.start", getName()));
-    }
-
     private final Http11ConnectionHandler cHandler;
 
     public boolean getUseSendfile() { return ((AprEndpoint)endpoint).getUseSendfile(); }

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Wed Dec  8 14:51:10
2010
@@ -81,19 +81,6 @@ public class Http11NioProtocol extends A
     }
 
 
-    @Override
-    public void start() throws Exception {
-        try {
-            endpoint.start();
-        } catch (Exception ex) {
-            log.error(sm.getString("http11protocol.endpoint.starterror"), ex);
-            throw ex;
-        }
-        if(log.isInfoEnabled())
-            log.info(sm.getString("http11protocol.start", getName()));
-    }
-
-
     // -------------------- Properties--------------------
     
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1043441&r1=1043440&r2=1043441&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Wed Dec  8 14:51:10 2010
@@ -82,21 +82,6 @@ public class Http11Protocol extends Abst
     protected Http11ConnectionHandler cHandler;
 
 
-    // ----------------------------------------- ProtocolHandler Implementation
-
-    @Override
-    public void start() throws Exception {
-        try {
-            endpoint.start();
-        } catch (Exception ex) {
-            log.error(sm.getString("http11protocol.endpoint.starterror"), ex);
-            throw ex;
-        }
-        if (log.isInfoEnabled())
-            log.info(sm.getString("http11protocol.start", getName()));
-    }
-
-
     // -----------------------------------  Http11ConnectionHandler Inner Class
 
     protected static class Http11ConnectionHandler implements Handler {



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


Mime
View raw message