tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1042648 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocolHandler.java ajp/AbstractAjpProtocol.java http11/AbstractHttp11Protocol.java
Date Mon, 06 Dec 2010 14:02:20 GMT
Author: markt
Date: Mon Dec  6 14:02:19 2010
New Revision: 1042648

URL: http://svn.apache.org/viewvc?rev=1042648&view=rev
Log:
Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360
Start to pull stuff up into the base class

Modified:
    tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
    tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.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=1042648&r1=1042647&r2=1042648&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Dec  6 14:02:19 2010
@@ -17,14 +17,48 @@
 package org.apache.coyote;
 
 import javax.management.MBeanRegistration;
+import javax.management.ObjectName;
 
 import org.apache.juli.logging.Log;
+import org.apache.tomcat.util.net.AbstractEndpoint;
 
 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();
+    /**
+     * Name of MBean for the Global Request Processor.
+     */
+    protected ObjectName rgOname = null;
+
+    
+    /**
+     * Name of MBean for the ThreadPool.
+     */
+    protected ObjectName tpOname = null;
+
+    
+    /**
+     * Endpoint that provides low-level network I/O - must be matched to the
+     * ProtocolHandler implementation (ProtocolHandler using BIO, requires BIO
+     * Endpoint etc.).
+     */
+    protected AbstractEndpoint endpoint = null;
 
+    
+    /**
+     * The adapter provides the link between the ProtocolHandler and the
+     * connector.
+     */
+    protected Adapter adapter;
+    @Override
+    public void setAdapter(Adapter adapter) { this.adapter = adapter; }
+    @Override
+    public Adapter getAdapter() { return adapter; }
+
+
+    /**
+     * Concrete implementations need to provide access to their logger to be
+     * used by the abstract classes.
+     */
+    protected abstract Log getLog();
 }

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=1042648&r1=1042647&r2=1042648&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Dec  6 14:02:19 2010
@@ -26,9 +26,7 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.AbstractProtocolHandler;
-import org.apache.coyote.Adapter;
 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 extends AbstractProtocolHandler {
@@ -37,16 +35,6 @@ public abstract class AbstractAjpProtoco
      */
     protected static final StringManager sm = StringManager.getManager(Constants.Package);
         
-    protected ObjectName tpOname = null;
-    protected ObjectName rgOname = null;
-
-    protected AbstractEndpoint endpoint = null;
-    
-    /**
-     * The adapter, used to call the connector.
-     */
-    protected Adapter adapter;
-    
     protected HashMap<String, Object> attributes = new HashMap<String, Object>();
     
     /** 
@@ -89,20 +77,6 @@ public abstract class AbstractAjpProtoco
         return (String)getAttribute(name);
     }
 
-    /**
-     * The adapter, used to call the connector
-     */
-    @Override
-    public void setAdapter(Adapter adapter) {
-        this.adapter = adapter;
-    }
-
-
-    @Override
-    public Adapter getAdapter() {
-        return adapter;
-    }
-
     @Override
     public void pause() throws Exception {
         try {

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=1042648&r1=1042647&r2=1042648&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon Dec  6 14:02:19
2010
@@ -26,9 +26,7 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.coyote.AbstractProtocolHandler;
-import org.apache.coyote.Adapter;
 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;
 
@@ -37,23 +35,9 @@ public abstract class AbstractHttp11Prot
      * The string manager for this package.
      */
     protected static final StringManager sm = StringManager.getManager(Constants.Package);
-    
-    protected ObjectName tpOname = null;
-    protected ObjectName rgOname = null;
 
-    protected AbstractEndpoint endpoint = null;
-    
     protected SSLImplementation sslImplementation = null;
     
-    /**
-     * The adapter, used to call the connector.
-     */
-    protected Adapter adapter;
-    @Override
-    public void setAdapter(Adapter adapter) { this.adapter = adapter; }
-    @Override
-    public Adapter getAdapter() { return adapter; }
-
     
     protected HashMap<String, Object> attributes = new HashMap<String, Object>();
 



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


Mime
View raw message