public void setSoLinger(int soLinger) { endpoint.setSoLinger(soLinger); }
+ public int getKeepAliveTimeout() { return endpoint.getKeepAliveTimeout(); }
+ public void setKeepAliveTimeout(int keepAliveTimeout) {
+ endpoint.setKeepAliveTimeout(keepAliveTimeout);
+ }
+
+
+
// ---------------------- Properties that are passed through to the EndPoint
// ------------------------------------ and are made available as attributes
}
+ /*
+ * When Tomcat expects data from the client, this is the time Tomcat will
+ * wait for that data to arrive before closing the connection.
+ */
+ public int getConnectionTimeout() {
+ // Note that the endpoint uses the alternative name
+ return endpoint.getSoTimeout();
+ }
+ public void setConnectionTimeout(int timeout) {
+ // Note that the endpoint uses the alternative name
+ endpoint.setSoTimeout(timeout);
+ String str = Integer.toString(timeout);
+ setAttribute("connectionTimeout", str);
+ // Also set the attribute for the alternative name
+ setAttribute("soTimeout", str);
+ }
+
+ /*
+ * Alternative name for connectionTimeout property
+ */
+ public int getSoTimeout() {
+ return getConnectionTimeout();
+ }
+ public void setSoTimeout(int timeout) {
+ setConnectionTimeout(timeout);
+ }
+
+
// -------------------------------------------------------- Abstract methods
/**
* Concrete implementations need to provide access to their logger to be
Registry.getRegistry(null, null).unregisterComponent(rgOname);
}
- // *
public String getName() {
String encodedAddr = "";
if (getAddress() != null) {
return ("ajp-" + encodedAddr + endpoint.getPort());
}
- public int getSoTimeout() { return endpoint.getSoTimeout(); }
- public void setSoTimeout(int soTimeout) { endpoint.setSoTimeout(soTimeout); }
-
/**
* Should authentication be done in the native webserver layer,
* or in the Servlet container ?
}
- /**
- * The number of seconds Tomcat will wait for a subsequent request
- * before closing the connection.
- */
- protected int keepAliveTimeout = -1;
- public int getKeepAliveTimeout() { return keepAliveTimeout; }
- public void setKeepAliveTimeout(int timeout) { keepAliveTimeout = timeout; }
-
// -------------------- JMX related methods --------------------
protected String domain;
processor.setAdapter(proto.adapter);
processor.setTomcatAuthentication(proto.tomcatAuthentication);
processor.setRequiredSecret(proto.requiredSecret);
- processor.setKeepAliveTimeout(proto.keepAliveTimeout);
+ processor.setKeepAliveTimeout(proto.getKeepAliveTimeout());
register(processor);
return processor;
}
}
/**
- * The number of seconds Tomcat will wait for a subsequent request
- * before closing the connection.
- */
- public void setKeepAliveTimeout(int keepAliveTimeout) {
- endpoint.setKeepAliveTimeout(keepAliveTimeout);
- }
-
- public int getKeepAliveTimeout() {
- return endpoint.getKeepAliveTimeout();
- }
-
- public int getConnectionTimeout() {
- return getSoTimeout();
- }
-
- public void setConnectionTimeout( int timeout ) {
- setSoTimeout(timeout);
- }
-
- public int getSoTimeout() {
- return endpoint.getSoTimeout();
- }
-
- public void setSoTimeout( int i ) {
- endpoint.setSoTimeout(i);
- setAttribute("soTimeout", "" + i);
- setAttribute("connectionTimeout", "" + i);
- }
-
- // *
- /**
* Maximum size of the post which will be saved when processing certain
* requests, such as a POST.
*/
/**
* Keepalive timeout, if lesser or equal to 0 then soTimeout will be used.
*/
- private int keepAliveTimeout = 0;
- public void setKeepAliveTimeout(int keepAliveTimeout) { this.keepAliveTimeout = keepAliveTimeout; }
+ private int keepAliveTimeout = -1;
public int getKeepAliveTimeout() { return keepAliveTimeout;}
+ public void setKeepAliveTimeout(int keepAliveTimeout) {
+ this.keepAliveTimeout = keepAliveTimeout;
+ }
/**