tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteConnector.java
Date Tue, 26 Nov 2002 03:26:56 GMT
billbarker    2002/11/25 19:26:56

  Modified:    coyote/src/java/org/apache/coyote/tomcat4
                        CoyoteConnector.java
               coyote/src/java/org/apache/coyote/tomcat5
                        CoyoteConnector.java
  Log:
  Add a configuration option to disable setting a seperate time-out for uploads.
  
  The effect of this is many fewer calls to setSoTimeout.  I can't see the difference myself
(at least on Solaris), but it should be harmless as long as you don't expect to be doing large
uploads.
  
  Revision  Changes    Path
  1.18      +30 -4     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java
  
  Index: CoyoteConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- CoyoteConnector.java	11 Oct 2002 02:38:22 -0000	1.17
  +++ CoyoteConnector.java	26 Nov 2002 03:26:56 -0000	1.18
  @@ -259,6 +259,13 @@
        */
       private boolean secure = false;
   
  +    /**
  +     * Flag to disable setting a seperate time-out for uploads.
  +     * If <code>true</code>, then the <code>timeout</code> parameter
is
  +     * ignored.  If <code>false</code>, then the <code>timeout</code>
  +     * parameter is used to control uploads.
  +     */
  +    private boolean disableUploadTimeout = false;
   
       /**
        * The string manager for this package.
  @@ -721,6 +728,23 @@
   
       }
   
  +    /**
  +     * Return the flag that specifies upload time-out behavior.
  +     */
  +    public boolean getDisableUploadTimeout() {
  +        return disableUploadTimeout;
  +    }
  +
  +    /**
  +     * Set the flag to specify upload time-out behavior.
  +     *
  +     * @param isDisabled If <code>true</code>, then the <code>timeout</code>

  +     * parameter is ignored.  If <code>false</code>, then the 
  +     * <code>timeout</code> parameter is used to control uploads.
  +     */
  +    public void setDisableUploadTimeout( boolean isDisabled ) {
  +        disableUploadTimeout = isDisabled;
  +    }
   
       /**
        * Return the scheme that will be assigned to requests received
  @@ -964,6 +988,8 @@
                                          "" + connectionTimeout);
           IntrospectionUtils.setProperty(protocolHandler, "timeout", 
                                          "" + connectionTimeout);
  +        IntrospectionUtils.setProperty(protocolHandler, "disableUploadTimeout", 
  +                                       "" + disableUploadTimeout);
           if (address != null) {
               IntrospectionUtils.setProperty(protocolHandler, "address", 
                                              address);
  
  
  
  1.4       +30 -4     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteConnector.java
  
  Index: CoyoteConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteConnector.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CoyoteConnector.java	18 Oct 2002 05:58:53 -0000	1.3
  +++ CoyoteConnector.java	26 Nov 2002 03:26:56 -0000	1.4
  @@ -266,6 +266,13 @@
       private StringManager sm =
           StringManager.getManager(Constants.Package);
   
  +    /**
  +     * Flag to disable setting a seperate time-out for uploads.
  +     * If <code>true</code>, then the <code>timeout</code> parameter
is
  +     * ignored.  If <code>false</code>, then the <code>timeout</code>
  +     * parameter is used to control uploads.
  +     */
  +    private boolean disableUploadTimeout = false;
   
       /**
        * Has this component been initialized yet?
  @@ -715,6 +722,23 @@
   
       }
   
  +    /**
  +     * Return the flag that specifies upload time-out behavior.
  +     */
  +    public boolean getDisableUploadTimeout() {
  +        return disableUploadTimeout;
  +    }
  +
  +    /**
  +     * Set the flag to specify upload time-out behavior.
  +     *
  +     * @param isDisabled If <code>true</code>, then the <code>timeout</code>

  +     * parameter is ignored.  If <code>false</code>, then the 
  +     * <code>timeout</code> parameter is used to control uploads.
  +     */
  +    public void setDisableUploadTimeout( boolean isDisabled ) {
  +        disableUploadTimeout = isDisabled;
  +    }
   
       /**
        * Return the scheme that will be assigned to requests received
  @@ -936,6 +960,8 @@
                                          "" + connectionTimeout);
           IntrospectionUtils.setProperty(protocolHandler, "timeout", 
                                          "" + connectionTimeout);
  +        IntrospectionUtils.setProperty(protocolHandler, "disableUploadTimeout", 
  +                                       "" + disableUploadTimeout);
           if (address != null) {
               IntrospectionUtils.setProperty(protocolHandler, "address", 
                                              address);
  
  
  

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


Mime
View raw message