Package org.apache.xmlrpc.webserver
Class ServletConnection
- java.lang.Object
-
- org.apache.xmlrpc.webserver.ServletConnection
-
- All Implemented Interfaces:
ThreadPool.InterruptableTask,ThreadPool.Task
public class ServletConnection extends java.lang.Object implements ThreadPool.InterruptableTask
ServletWebServer'sThreadPool.Taskfor handling a single servlet connection.
-
-
Field Summary
Fields Modifier and Type Field Description private HttpServletRequestImplrequestprivate HttpServletResponseImplresponseprivate javax.servlet.http.HttpServletservletprivate booleanshuttingDownprivate java.net.Socketsocket
-
Constructor Summary
Constructors Constructor Description ServletConnection(javax.servlet.http.HttpServlet pServlet, java.net.Socket pSocket)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()Performs the task.voidshutdown()Interrupts the task.
-
-
-
Field Detail
-
servlet
private final javax.servlet.http.HttpServlet servlet
-
socket
private final java.net.Socket socket
-
request
private final HttpServletRequestImpl request
-
response
private final HttpServletResponseImpl response
-
shuttingDown
private boolean shuttingDown
-
-
Constructor Detail
-
ServletConnection
public ServletConnection(javax.servlet.http.HttpServlet pServlet, java.net.Socket pSocket) throws java.io.IOExceptionCreates a new instance.- Parameters:
pServlet- The servlet, which ought to handle the request.pSocket- The socket, to which the client is connected.- Throws:
java.io.IOException
-
-
Method Detail
-
run
public void run() throws java.lang.ThrowableDescription copied from interface:ThreadPool.TaskPerforms the task.- Specified by:
runin interfaceThreadPool.Task- Throws:
java.lang.Throwable- The task failed, and the worker thread won't be used again.
-
shutdown
public void shutdown() throws java.lang.ThrowableDescription copied from interface:ThreadPool.InterruptableTaskInterrupts the task.- Specified by:
shutdownin interfaceThreadPool.InterruptableTask- Throws:
java.lang.Throwable- Shutting down the task failed.
-
-