You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pe...@apache.org on 2005/11/12 20:23:04 UTC

svn commit: r332823 - in /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11: Http11BaseProtocol.java Http11Protocol.java

Author: pero
Date: Sat Nov 12 11:23:00 2005
New Revision: 332823

URL: http://svn.apache.org/viewcvs?rev=332823&view=rev
Log:
Refactor connection handler for better standalone support 
without JMX.

Modified:
    tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
    tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java

Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java?rev=332823&r1=332822&r2=332823&view=diff
==============================================================================
--- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java (original)
+++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java Sat Nov 12 11:23:00 2005
@@ -104,11 +104,20 @@
     public Adapter getAdapter() {
         return adapter;
     }
-
+    
+    protected Http11ConnectionHandler createConnectionHandler() {
+        Http11ConnectionHandler cHandler = new Http11ConnectionHandler( this );
+        setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
+        setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
+        setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
+        setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+        return cHandler ;
+    }
 
     /** Start the protocol
      */
     public void init() throws Exception {
+        cHandler = createConnectionHandler() ;
         ep.setConnectionHandler( cHandler );
         try {
             checkSocketFactory();

Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java?rev=332823&r1=332822&r2=332823&view=diff
==============================================================================
--- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java (original)
+++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Sat Nov 12 11:23:00 2005
@@ -59,13 +59,23 @@
 public class Http11Protocol extends Http11BaseProtocol implements MBeanRegistration
 {
     public Http11Protocol() {
+        /*
         cHandler = new JmxHttp11ConnectionHandler( this );
         setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
         setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
         setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
         setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+        */
+    }
+    
+    protected Http11ConnectionHandler createConnectionHandler() {
+        Http11ConnectionHandler cHandler = new JmxHttp11ConnectionHandler( this );
+        setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
+        setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
+        setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
+        setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+        return cHandler ;
     }
-
 
     ObjectName tpOname;
     ObjectName rgOname;



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


Re: svn commit: r332823 - in /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11: Http11BaseProtocol.java Http11Protocol.java

Posted by Costin Manolache <co...@gmail.com>.
Thanks.

Costin

On 11/12/05, pero@apache.org <pe...@apache.org> wrote:
> Author: pero
> Date: Sat Nov 12 11:23:00 2005
> New Revision: 332823
>
> URL: http://svn.apache.org/viewcvs?rev=332823&view=rev
> Log:
> Refactor connection handler for better standalone support
> without JMX.
>
> Modified:
>     tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
>     tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
>
> Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java
> URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java?rev=332823&r1=332822&r2=332823&view=diff
> ==============================================================================
> --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java (original)
> +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11BaseProtocol.java Sat Nov 12 11:23:00 2005
> @@ -104,11 +104,20 @@
>      public Adapter getAdapter() {
>          return adapter;
>      }
> -
> +
> +    protected Http11ConnectionHandler createConnectionHandler() {
> +        Http11ConnectionHandler cHandler = new Http11ConnectionHandler( this );
> +        setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
> +        setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
> +        setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
> +        setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
> +        return cHandler ;
> +    }
>
>      /** Start the protocol
>       */
>      public void init() throws Exception {
> +        cHandler = createConnectionHandler() ;
>          ep.setConnectionHandler( cHandler );
>          try {
>              checkSocketFactory();
>
> Modified: tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
> URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java?rev=332823&r1=332822&r2=332823&view=diff
> ==============================================================================
> --- tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java (original)
> +++ tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Sat Nov 12 11:23:00 2005
> @@ -59,13 +59,23 @@
>  public class Http11Protocol extends Http11BaseProtocol implements MBeanRegistration
>  {
>      public Http11Protocol() {
> +        /*
>          cHandler = new JmxHttp11ConnectionHandler( this );
>          setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
>          setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
>          setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
>          setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
> +        */
> +    }
> +
> +    protected Http11ConnectionHandler createConnectionHandler() {
> +        Http11ConnectionHandler cHandler = new JmxHttp11ConnectionHandler( this );
> +        setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
> +        setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
> +        setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
> +        setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
> +        return cHandler ;
>      }
> -
>
>      ObjectName tpOname;
>      ObjectName rgOname;
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

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