Nice idea, but need i18n for the actions so each needs its own string
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 8 Dec 2010 13:10:34 +0000 (13:10 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 8 Dec 2010 13:10:34 +0000 (13:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1043402 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/AbstractProtocolHandler.java
java/org/apache/coyote/LocalStrings.properties

index 23f5c4c..e730e56 100644 (file)
@@ -345,13 +345,13 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler,
     @Override
     public final void pause() throws Exception {
         if(getLog().isInfoEnabled())
-            getLog().info(sm.getString("abstractProtocolHandler.action",
-                    "Pausing", getName()));
+            getLog().info(sm.getString("abstractProtocolHandler.pause",
+                    getName()));
         try {
             endpoint.pause();
         } catch (Exception ex) {
-            getLog().error(sm.getString("abstractProtocolHandler.actionError",
-                    "pause", getName()), ex);
+            getLog().error(sm.getString("abstractProtocolHandler.pauseError",
+                    getName()), ex);
             throw ex;
         }
     }
@@ -359,13 +359,13 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler,
     @Override
     public final void resume() throws Exception {
         if(getLog().isInfoEnabled())
-            getLog().info(sm.getString("abstractProtocolHandler.action",
-                    "Resuming", getName()));
+            getLog().info(sm.getString("abstractProtocolHandler.resume",
+                    getName()));
         try {
             endpoint.resume();
         } catch (Exception ex) {
-            getLog().error(sm.getString("abstractProtocolHandler.actionError",
-                    "resume", getName()), ex);
+            getLog().error(sm.getString("abstractProtocolHandler.resumeError",
+                    getName()), ex);
             throw ex;
         }
     }
@@ -376,27 +376,27 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler,
         try {
             endpoint.stop();
         } catch (Exception ex) {
-            getLog().error(sm.getString("abstractProtocolHandler.action",
-                    "Stopping"), ex);
+            getLog().error(sm.getString("abstractProtocolHandler.stop",
+                    getName()), ex);
             throw ex;
         }
         if(getLog().isInfoEnabled())
-            getLog().info(sm.getString("abstractProtocolHandler.actionError",
-                    "stop", getName()));
+            getLog().info(sm.getString("abstractProtocolHandler.stopError",
+                    getName()));
     }
 
 
     @Override
     public final void destroy() {
         if(getLog().isInfoEnabled()) {
-            getLog().info(sm.getString("abstractProtocolHandler.action",
-                    "Destroying", getName()));
+            getLog().info(sm.getString("abstractProtocolHandler.destroy",
+                    getName()));
         }
         try {
             endpoint.destroy();
         } catch (Exception e) {
-            getLog().error(sm.getString("abstractProtocolHandler.actionError",
-                    "destroy", getName()), e);
+            getLog().error(sm.getString("abstractProtocolHandler.destroyError",
+                    getName()), e);
         }
         
         if( tpOname!=null )
index 7ba6011..3e376cf 100644 (file)
 # 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.pause=Pausing ProtocolHandler [{0}]
+abstractProtocolHandler.pauseError=Failed to pause end point associated with ProtocolHandler [{0}]
+abstractProtocolHandler.resume=Resuming ProtocolHandler [{0}]
+abstractProtocolHandler.resumeError=Failed to resume end point associated with ProtocolHandler [{0}]
+abstractProtocolHandler.stop=Stopping ProtocolHandler [{0}]
+abstractProtocolHandler.stopError=Failed to stop end point associated with ProtocolHandler [{0}]
+abstractProtocolHandler.destroy=Destroying ProtocolHandler [{0}]
+abstractProtocolHandler.destroyError=Failed to destroy end point associated with ProtocolHandler [{0}]
 
 asyncStateMachine.invalidAsyncState=Calling [{0}] is not valid for a request with Async state [{1}]