tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 Constants.java CoyoteConnector.java
Date Mon, 28 Apr 2003 17:08:26 GMT
remm        2003/04/28 10:08:26

  Modified:    coyote/src/java/org/apache/coyote/tomcat4 Constants.java
                        CoyoteConnector.java
  Log:
  - Add flags for upload timeout as well as server socket timeout.
  
  Revision  Changes    Path
  1.6       +2 -0      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/Constants.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Constants.java	10 Feb 2003 09:57:37 -0000	1.5
  +++ Constants.java	28 Apr 2003 17:08:25 -0000	1.6
  @@ -74,6 +74,8 @@
       public static final String Package = "org.apache.coyote.tomcat4";
       public static final int DEFAULT_CONNECTION_LINGER = -1;
       public static final int DEFAULT_CONNECTION_TIMEOUT = 60000;
  +    public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 300000;
  +    public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
   
       public static final int PROCESSOR_IDLE = 0;
       public static final int PROCESSOR_ACTIVE = 1;
  
  
  
  1.25      +66 -5     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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- CoyoteConnector.java	9 Apr 2003 18:35:52 -0000	1.24
  +++ CoyoteConnector.java	28 Apr 2003 17:08:25 -0000	1.25
  @@ -207,6 +207,21 @@
   
   
       /**
  +     * Timeout value on the incoming connection during request processing.
  +     * Note : a value of 0 means no timeout.
  +     */
  +    private int connectionUploadTimeout = 
  +        Constants.DEFAULT_CONNECTION_UPLOAD_TIMEOUT;
  +
  +
  +    /**
  +     * Timeout value on the server socket.
  +     * Note : a value of 0 means no timeout.
  +     */
  +    private int serverSocketTimeout = Constants.DEFAULT_SERVER_SOCKET_TIMEOUT;
  +
  +
  +    /**
        * The port number on which we listen for requests.
        */
       private int port = 8080;
  @@ -403,6 +418,50 @@
   
   
       /**
  +     * Return the connection upload timeout for this Connector.
  +     */
  +    public int getConnectionUploadTimeout() {
  +
  +        return (connectionUploadTimeout);
  +
  +    }
  +
  +
  +    /**
  +     * Set the connection upload timeout for this Connector.
  +     *
  +     * @param connectionUploadTimeout The new connection upload timeout
  +     */
  +    public void setConnectionUploadTimeout(int connectionUploadTimeout) {
  +
  +        this.connectionUploadTimeout = connectionUploadTimeout;
  +
  +    }
  +
  +
  +    /**
  +     * Return the server socket timeout for this Connector.
  +     */
  +    public int getServerSocketTimeout() {
  +
  +        return (serverSocketTimeout);
  +
  +    }
  +
  +
  +    /**
  +     * Set the server socket timeout for this Connector.
  +     *
  +     * @param connectionUploadTimeout The new server socket timeout
  +     */
  +    public void setServerSocketTimeout(int serverSocketTimeout) {
  +
  +        this.serverSocketTimeout = serverSocketTimeout;
  +
  +    }
  +
  +
  +    /**
        * Return the accept count for this Connector.
        */
       public int getAcceptCount() {
  @@ -1051,7 +1110,9 @@
           IntrospectionUtils.setProperty(protocolHandler, "soTimeout",
                                          "" + connectionTimeout);
           IntrospectionUtils.setProperty(protocolHandler, "timeout",
  -                                       "" + connectionTimeout);
  +                                       "" + connectionUploadTimeout);
  +        IntrospectionUtils.setProperty(protocolHandler, "serverSoTimeout",
  +                                       "" + serverSocketTimeout);
           IntrospectionUtils.setProperty(protocolHandler, "disableUploadTimeout",
                                          "" + disableUploadTimeout);
           IntrospectionUtils.setProperty(protocolHandler, "maxKeepAliveRequests",
  
  
  

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


Mime
View raw message