billbarker 02/03/19 21:35:53
Modified: coyote/src/java/org/apache/coyote/tomcat3
CoyoteInterceptor.java
Log:
Connector support for the new MaxKeepAliveRequests attribute.
Revision Changes Path
1.6 +10 -0
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java
Index: CoyoteInterceptor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CoyoteInterceptor.java 19 Mar 2002 06:06:18 -0000 1.5
+++ CoyoteInterceptor.java 20 Mar 2002 05:35:53 -0000 1.6
@@ -66,6 +66,7 @@
import java.text.*;
import org.apache.tomcat.core.*;
import org.apache.tomcat.util.res.StringManager;
+import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.buf.*;
import org.apache.tomcat.util.http.*;
import org.apache.tomcat.util.net.*;
@@ -117,6 +118,7 @@
private String reportedname;
private int socketCloseDelay=-1;
private String processorClassName="org.apache.coyote.http11.Http11Processor";
+ private int maxKeepAliveRequests=100; // as in Apache HTTPD server
public CoyoteInterceptor() {
super();
@@ -139,6 +141,12 @@
reportedname = reportedName;
}
+ /** Set the maximum number of Keep-Alive requests that we will honor.
+ */
+ public void setMaxKeepAliveRequests(int mkar) {
+ maxKeepAliveRequests = mkar;
+ }
+
public void setSocketCloseDelay( int d ) {
socketCloseDelay=d;
}
@@ -163,6 +171,8 @@
getClass().getClassLoader().loadClass(processorClassName);
processor = (Processor)processorClass.newInstance();
processor.setAdapter(adaptor);
+ IntrospectionUtils.setProperty(processor,"maxKeepAliveRequests",
+ String.valueOf(maxKeepAliveRequests));
} catch(Exception ex) {
log("Can't load Processor", ex);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>