tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1043395 - in /tomcat/trunk/java/org/apache/coyote: ./ ajp/ http11/
Date Wed, 08 Dec 2010 12:57:54 GMT
Author: markt
Date: Wed Dec  8 12:57:54 2010
New Revision: 1043395

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

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
    tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
    tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
    tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
    tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
    tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties
    tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties
    tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Wed Dec  8 12:57:54 2010
@@ -342,19 +342,46 @@ public abstract class AbstractProtocolHa
     @Override
     public abstract void init() throws Exception;
 
+    @Override
+    public final void pause() throws Exception {
+        if(getLog().isInfoEnabled())
+            getLog().info(sm.getString("abstractProtocolHandler.action",
+                    "Pausing", getName()));
+        try {
+            endpoint.pause();
+        } catch (Exception ex) {
+            getLog().error(sm.getString("abstractProtocolHandler.actionError",
+                    "pause", getName()), ex);
+            throw ex;
+        }
+    }
+
+    @Override
+    public final void resume() throws Exception {
+        if(getLog().isInfoEnabled())
+            getLog().info(sm.getString("abstractProtocolHandler.action",
+                    "Resuming", getName()));
+        try {
+            endpoint.resume();
+        } catch (Exception ex) {
+            getLog().error(sm.getString("abstractProtocolHandler.actionError",
+                    "resule", getName()), ex);
+            throw ex;
+        }
+    }
+
 
     @Override
     public final void destroy() {
         if(getLog().isInfoEnabled()) {
-            getLog().info(sm.getString("abstractProtocolHandler.destroy",
-                    getName()));
+            getLog().info(sm.getString("abstractProtocolHandler.action",
+                    "Destroying", getName()));
         }
         try {
             endpoint.destroy();
         } catch (Exception e) {
-            getLog().error(sm.getString(
-                    "abstractProtocolHandler.endPointDestroyError", getName()),
-                    e);
+            getLog().error(sm.getString("abstractProtocolHandler.actionError",
+                    "destroy", getName()), e);
         }
         
         if( tpOname!=null )

Modified: tomcat/trunk/java/org/apache/coyote/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Dec  8 12:57:54 2010
@@ -13,9 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+abstractProtocolHandler.action={0} ProtocolHandler [{1}]
+abstractProtocolHandler.actionError=Failed to {0} end point associated with ProtocolHandler
[{1}]
 abstractProtocolHandler.getAttribute=Get attribute [{0}] with value [{1}]
 abstractProtocolHandler.setAttribute=Set attribute [{0}] with value [{1}]
-abstractProtocolHandler.endPointDestroyError=Failed to destroy end point associated with
ProtocolHandler [{0}]
-abstractProtocolHandler.destroy=Destroying ProtocolHandler [{0}]
 
 asyncStateMachine.invalidAsyncState=Calling [{0}] is not valid for a request with Async state
[{1}]

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=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Wed Dec  8 12:57:54 2010
@@ -76,33 +76,6 @@ public abstract class AbstractAjpProtoco
     // ------------------------------------------------------- Lifecycle methods
 
     @Override
-    public void pause() throws Exception {
-        try {
-            endpoint.pause();
-        } catch (Exception ex) {
-            getLog().error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
-            throw ex;
-        }
-        if (getLog().isInfoEnabled())
-            getLog().info(sm.getString("ajpprotocol.pause", getName()));
-    }
-
-
-    @Override
-    public void resume() throws Exception {
-        try {
-            endpoint.resume();
-        } catch (Exception ex) {
-            getLog().error(sm.getString("ajpprotocol.endpoint.resumeerror"),
-                    ex);
-            throw ex;
-        }
-        if (getLog().isInfoEnabled())
-            getLog().info(sm.getString("ajpprotocol.resume", getName()));
-    }
-
-
-    @Override
     public void stop() throws Exception {
         try {
             endpoint.stop();

Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties Wed Dec  8 12:57:54 2010
@@ -30,10 +30,6 @@ ajpprotocol.init=Initializing Coyote AJP
 ajpprotocol.proto.error=Error reading request, ignored
 ajpprotocol.start=Starting Coyote AJP/1.3 on {0}
 ajpprotocol.stop=Stopping Coyote AJP/1.3 on {0}
-ajpprotocol.pause=Pausing Coyote AJP/1.3 on {0}
-ajpprotocol.endpoint.pauseerror=Error pausing endpoint
-ajpprotocol.resume=Resuming Coyote AJP/1.3 on {0}
-ajpprotocol.endpoint.resumeerror=Error resuming endpoint
 ajpprotocol.failedread=Socket read failed
 ajpprotocol.failedwrite=Socket write failed
 ajpprotocol.request.register=Error registering request processor in JMX

Modified: tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings_es.properties Wed Dec  8 12:57:54
2010
@@ -19,10 +19,6 @@ ajpprotocol.init = Inicializando Coyote 
 ajpprotocol.proto.error = Error leyendo requerimiento, ignorado
 ajpprotocol.start = Arrancando Coyote AJP/1.3 en {0}
 ajpprotocol.stop = Parando Coyote AJP/1.3 en {0}
-ajpprotocol.pause = Pausando Coyote AJP/1.3 en {0}
-ajpprotocol.endpoint.pauseerror = Error pausando punto final
-ajpprotocol.resume = Retomando Coyote AJP/1.3 en {0}
-ajpprotocol.endpoint.resumeerror = Error retomando punto final
 ajpprotocol.failedread = Fallo en lectura de Conector
 ajpprotocol.failedwrite = Fallo en escritura de Conector
 ajpprotocol.request.register = Error registrando procesador de requerimiento en JMX

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=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Wed Dec  8 12:57:54
2010
@@ -194,32 +194,6 @@ public abstract class AbstractHttp11Prot
     // ------------------------------------------------------- Lifecycle methods
     
     @Override
-    public void pause() throws Exception {
-        try {
-            endpoint.pause();
-        } catch (Exception ex) {
-            getLog().error(sm.getString("http11protocol.endpoint.pauseerror"),
-                    ex);
-            throw ex;
-        }
-        if(getLog().isInfoEnabled())
-            getLog().info(sm.getString("http11protocol.pause", getName()));
-    }
-
-    @Override
-    public void resume() throws Exception {
-        try {
-            endpoint.resume();
-        } catch (Exception ex) {
-            getLog().error(sm.getString("http11protocol.endpoint.resumeerror"),
-                    ex);
-            throw ex;
-        }
-        if(getLog().isInfoEnabled())
-            getLog().info(sm.getString("http11protocol.resume", getName()));
-    }
-
-    @Override
     public void stop() throws Exception {
         try {
             endpoint.stop();

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Wed Dec  8 12:57:54
2010
@@ -26,10 +26,6 @@ http11protocol.proto.socketexception.inf
 http11protocol.socketfactory.initerror=Error initializing socket factory
 http11protocol.start=Starting Coyote HTTP/1.1 on {0}
 http11protocol.stop=Stopping Coyote HTTP/1.1 on {0}
-http11protocol.pause=Pausing Coyote HTTP/1.1 on {0}
-http11protocol.endpoint.pauseerror=Error pausing endpoint
-http11protocol.resume=Resuming Coyote HTTP/1.1 on {0}
-http11protocol.endpoint.resumeerror=Error resuming endpoint
 
 http11processor.regexp.error=Error parsing regular expression {0}
 http11processor.filter.unknown=Unknown filter {0}

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_es.properties Wed Dec  8 12:57:54
2010
@@ -24,10 +24,6 @@ http11protocol.proto.socketexception.inf
 http11protocol.socketfactory.initerror = Error inicializando f\u00E1brica de enchufes (sockets)
 http11protocol.start = Arrancando Coyote HTTP/1.1 en puerto {0}
 http11protocol.stop = Parando Coyote HTTP/1.1 en puerto {0}
-http11protocol.pause = Pausando Coyote HTTP/1.1 en puerto {0}
-http11protocol.endpoint.pauseerror = Error al pausar punto final
-http11protocol.resume = Retomando Coyote HTTP/1.1 en {0}
-http11protocol.endpoint.resumeerror = Error al retomar punto final
 
 http11processor.regexp.error = Error al analizar expresi\u00F3n regular {0}
 http11processor.filter.unknown = Filtro desconocido {0}

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_fr.properties Wed Dec  8 12:57:54
2010
@@ -24,8 +24,6 @@ http11protocol.proto.socketexception.inf
 http11protocol.socketfactory.initerror=Erreur \u00e0 l'initialisation du cr\u00e9ateur de
socket (socket factory)
 http11protocol.start=D\u00e9marrage de Coyote HTTP/1.1 sur {0}
 http11protocol.stop=Arr\u00eat de Coyote HTTP/1.1 sur {0}
-http11protocol.pause=Suspension de Coyote HTTP/1.1 sur {0}
-http11protocol.resume=Red\u00e9marrage de Coyote HTTP/1.1 sur {0}
 
 iib.eof.error=Fin de flux (EOF) inattendue \u00e0 la lecture sur la socket
 iib.requestheadertoolarge.error=L'ent\u00eate de requ\u00eate est trop important

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties?rev=1043395&r1=1043394&r2=1043395&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings_ja.properties Wed Dec  8 12:57:54
2010
@@ -24,10 +24,6 @@ http11protocol.proto.socketexception.inf
 http11protocol.socketfactory.initerror=\u30bd\u30b1\u30c3\u30c8\u30d5\u30a1\u30af\u30c8\u30ea\u3092\u521d\u671f\u5316\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
 http11protocol.start=Coyote HTTP/1.1\u3092 {0} \u3067\u8d77\u52d5\u3057\u307e\u3059
 http11protocol.stop=Coyote HTTP/1.1\u3092 {0} \u3067\u505c\u6b62\u3057\u307e\u3059
-http11protocol.pause=Coyote HTTP/1.1\u3092 {0} \u3067\u4e00\u6642\u505c\u6b62\u3057\u307e\u3059
-http11protocol.endpoint.pauseerror=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u4e00\u6642\u505c\u6b62\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-http11protocol.resume=Coyote HTTP/1.1\u3092 {0} \u3067\u518d\u958b\u3057\u307e\u3059
-http11protocol.endpoint.resumeerror=\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u518d\u958b\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
  
 iib.eof.error=\u30bd\u30b1\u30c3\u30c8\u304b\u3089\u4e88\u671f\u3057\u306a\u3044EOF\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3057\u305f
 iib.requestheadertoolarge.error=\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u304c\u9577\u3059\u304e\u307e\u3059



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


Mime
View raw message