import org.apache.tomcat.util.http.MimeHeaders;\r
import org.apache.tomcat.util.net.AprEndpoint;\r
import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
\r
\r
/**\r
*/\r
public boolean process(long socket)\r
throws IOException {\r
- ThreadWithAttributes thrA=\r
- (ThreadWithAttributes)Thread.currentThread();\r
RequestInfo rp = request.getRequestProcessor();\r
- thrA.setCurrentStage(endpoint, "parsing http request");\r
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);\r
\r
// Setting up the socket\r
}\r
\r
// Setting up filters, and parse some request headers\r
- thrA.setCurrentStage(endpoint, "prepareRequest");\r
rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);\r
try {\r
prepareRequest();\r
- thrA.setParam(endpoint, request.requestURI());\r
} catch (Throwable t) {\r
log.debug(sm.getString("ajpprocessor.request.prepare"), t);\r
// 400 - Internal Server Error\r
// Process the request in the adapter\r
if (!error) {\r
try {\r
- thrA.setCurrentStage(endpoint, "service");\r
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);\r
adapter.service(request, response);\r
} catch (InterruptedIOException e) {\r
}\r
request.updateCounters();\r
\r
- thrA.setCurrentStage(endpoint, "ended");\r
rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);\r
recycle();\r
\r
import org.apache.tomcat.util.http.MimeHeaders;
import org.apache.tomcat.util.net.JIoEndpoint;
import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
/**
*/
public boolean process(Socket socket)
throws IOException {
- ThreadWithAttributes thrA=
- (ThreadWithAttributes)Thread.currentThread();
RequestInfo rp = request.getRequestProcessor();
- thrA.setCurrentStage(endpoint, "parsing http request");
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
// Setting up the socket
}
// Setting up filters, and parse some request headers
- thrA.setCurrentStage(endpoint, "prepareRequest");
rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);
try {
prepareRequest();
- thrA.setParam(endpoint, request.requestURI());
} catch (Throwable t) {
log.debug(sm.getString("ajpprocessor.request.prepare"), t);
// 400 - Internal Server Error
// Process the request in the adapter
if (!error) {
try {
- thrA.setCurrentStage(endpoint, "service");
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
adapter.service(request, response);
} catch (InterruptedIOException e) {
}
request.updateCounters();
- thrA.setCurrentStage(endpoint, "ended");
rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
recycle();
import org.apache.tomcat.util.http.MimeHeaders;\r
import org.apache.tomcat.util.net.AprEndpoint;\r
import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
\r
\r
/**\r
*/\r
public boolean process(long socket)\r
throws IOException {\r
- ThreadWithAttributes thrA=\r
- (ThreadWithAttributes)Thread.currentThread();\r
RequestInfo rp = request.getRequestProcessor();\r
- thrA.setCurrentStage(endpoint, "parsing http request");\r
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);\r
\r
// Set the remote address\r
break;\r
}\r
request.setStartTime(System.currentTimeMillis());\r
- thrA.setParam(endpoint, request.requestURI());\r
keptAlive = true;\r
if (!disableUploadTimeout) {\r
Socket.timeoutSet(socket, timeout * 1000);\r
}\r
\r
// Setting up filters, and parse some request headers\r
- thrA.setCurrentStage(endpoint, "prepareRequest");\r
rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);\r
try {\r
prepareRequest();\r
// Process the request in the adapter\r
if (!error) {\r
try {\r
- thrA.setCurrentStage(endpoint, "service");\r
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);\r
adapter.service(request, response);\r
// Handle when the response was committed before a serious\r
\r
// Finish the handling of the request\r
try {\r
- thrA.setCurrentStage(endpoint, "endRequestIB");\r
rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);\r
inputBuffer.endRequest();\r
} catch (IOException e) {\r
error = true;\r
}\r
try {\r
- thrA.setCurrentStage(endpoint, "endRequestOB");\r
rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);\r
outputBuffer.endRequest();\r
} catch (IOException e) {\r
}\r
request.updateCounters();\r
\r
- thrA.setCurrentStage(endpoint, "ended");\r
rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);\r
\r
// Don't reset the param - we'll see it as ended. Next request\r
import org.apache.tomcat.util.net.JIoEndpoint;\r
import org.apache.tomcat.util.net.SSLSupport;\r
import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
\r
\r
/**\r
*/\r
public void process(Socket socket)\r
throws IOException {\r
- ThreadWithAttributes thrA=\r
- (ThreadWithAttributes)Thread.currentThread();\r
RequestInfo rp = request.getRequestProcessor();\r
- thrA.setCurrentStage(endpoint, "parsing http request");\r
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);\r
\r
// Set the remote address\r
}\r
inputBuffer.parseRequestLine();\r
request.setStartTime(System.currentTimeMillis());\r
- thrA.setParam( endpoint, request.requestURI() );\r
keptAlive = true;\r
if (!disableUploadTimeout) {\r
socket.setSoTimeout(timeout);\r
}\r
\r
// Setting up filters, and parse some request headers\r
- thrA.setCurrentStage(endpoint, "prepareRequest");\r
rp.setStage(org.apache.coyote.Constants.STAGE_PREPARE);\r
try {\r
prepareRequest();\r
// Process the request in the adapter\r
if (!error) {\r
try {\r
- thrA.setCurrentStage(endpoint, "service");\r
rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);\r
adapter.service(request, response);\r
// Handle when the response was committed before a serious\r
\r
// Finish the handling of the request\r
try {\r
- thrA.setCurrentStage(endpoint, "endRequestIB");\r
rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);\r
inputBuffer.endRequest();\r
} catch (IOException e) {\r
error = true;\r
}\r
try {\r
- thrA.setCurrentStage(endpoint, "endRequestOB");\r
rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);\r
outputBuffer.endRequest();\r
} catch (IOException e) {\r
}\r
request.updateCounters();\r
\r
- thrA.setCurrentStage(endpoint, "ended");\r
rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);\r
\r
// Don't reset the param - we'll see it as ended. Next request\r
import org.apache.tomcat.jni.Socket;\r
import org.apache.tomcat.jni.Status;\r
import org.apache.tomcat.util.res.StringManager;\r
-import org.apache.tomcat.util.threads.ThreadWithAttributes;\r
\r
/**\r
* APR tailored thread pool, providing the following services:\r
* Start the background processing thread.\r
*/\r
public void start() {\r
- thread = new ThreadWithAttributes(AprEndpoint.this, this);\r
+ thread = new Thread(this);\r
thread.setName(getName() + "-" + (++curThreads));\r
thread.setDaemon(true);\r
thread.start();\r
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
-import org.apache.tomcat.util.threads.ThreadWithAttributes;
/**
* Handle incoming TCP connections.
* Start the background processing thread.
*/
public void start() {
- thread = new ThreadWithAttributes(JIoEndpoint.this, this);
+ thread = new Thread(this);
thread.setName(getName() + "-" + (++curThreads));
thread.setDaemon(true);
thread.start();