tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1042639 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11Protocol.java
Date Mon, 06 Dec 2010 13:36:49 GMT
Author: markt
Date: Mon Dec  6 13:36:48 2010
New Revision: 1042639

URL: http://svn.apache.org/viewvc?rev=1042639&view=rev
Log:
Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Implement a common base class for ProtocolHandler implementations that will handle life-cycle/mbean
issues (once more re-factoring has been completed)

Added:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java   (with props)
Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java

Added: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1042639&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (added)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 13:36:48 2010
@@ -0,0 +1,30 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.coyote;
+
+import javax.management.MBeanRegistration;
+
+import org.apache.juli.logging.Log;
+
+public abstract class AbstractProtocolHandler implements ProtocolHandler,
+        MBeanRegistration {
+
+    // Concrete implementations need to provide access to their logger to be
+    // used by the abstract classes.
+    protected abstract Log getLog();
+
+}

Propchange: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

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=1042639&r1=1042638&r2=1042639&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 13:36:48 2010
@@ -22,25 +22,21 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.concurrent.Executor;
 
-import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.apache.coyote.AbstractProtocolHandler;
 import org.apache.coyote.Adapter;
-import org.apache.coyote.ProtocolHandler;
-import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.res.StringManager;
 
-public abstract class AbstractAjpProtocol implements ProtocolHandler, MBeanRegistration {
+public abstract class AbstractAjpProtocol extends AbstractProtocolHandler {
     /**
      * The string manager for this package.
      */
     protected static final StringManager sm = StringManager.getManager(Constants.Package);
-    
-    protected abstract Log getLog();
-    
+        
     protected ObjectName tpOname = null;
     protected ObjectName rgOname = null;
 

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=1042639&r1=1042638&r2=1042639&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon Dec  6 13:36:48
2010
@@ -22,26 +22,22 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.concurrent.Executor;
 
-import javax.management.MBeanRegistration;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
+import org.apache.coyote.AbstractProtocolHandler;
 import org.apache.coyote.Adapter;
-import org.apache.coyote.ProtocolHandler;
-import org.apache.juli.logging.Log;
 import org.apache.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.SSLImplementation;
 import org.apache.tomcat.util.res.StringManager;
 
-public abstract class AbstractHttp11Protocol implements ProtocolHandler, MBeanRegistration
{
+public abstract class AbstractHttp11Protocol extends AbstractProtocolHandler {
     /**
      * The string manager for this package.
      */
     protected static final StringManager sm = StringManager.getManager(Constants.Package);
     
-    protected abstract Log getLog();
-    
     protected ObjectName tpOname = null;
     protected ObjectName rgOname = null;
 



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


Mime
View raw message