public class ServletConnection extends java.lang.Object implements ThreadPool.InterruptableTask
ServletWebServer's
ThreadPool.Task
for handling a single
servlet connection.Constructor and Description |
---|
ServletConnection(javax.servlet.http.HttpServlet pServlet,
java.net.Socket pSocket)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Performs the task.
|
void |
shutdown()
Interrupts the task.
|
public ServletConnection(javax.servlet.http.HttpServlet pServlet, java.net.Socket pSocket) throws java.io.IOException
pServlet
- The servlet, which ought to handle the request.pSocket
- The socket, to which the client is connected.java.io.IOException
public void run() throws java.lang.Throwable
ThreadPool.Task
run
in interface ThreadPool.Task
java.lang.Throwable
- The task failed, and the worker thread won't be used again.public void shutdown() throws java.lang.Throwable
ThreadPool.InterruptableTask
shutdown
in interface ThreadPool.InterruptableTask
java.lang.Throwable
- Shutting down the task failed.Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.