org.apache.xmlrpc.webserver
public class Connection extends Object implements ThreadPool.Task, ServerStreamConnection
Constructor Summary | |
---|---|
Connection(WebServer pWebServer, XmlRpcStreamServer pServer, Socket pSocket) Creates a new webserver connection on the given socket. |
Method Summary | |
---|---|
void | close() |
InputStream | newInputStream() |
OutputStream | newOutputStream() |
void | run() |
void | setResponseHeader(String pHeader, String pValue) Sets a response header value. |
void | writeError(RequestData pData, Throwable pError, OutputStream pStream) Writes an error response to the output stream. |
void | writeErrorHeader(RequestData pData, Throwable pError, int pContentLength) Writes an error responses headers to the output stream. |
void | writeResponse(RequestData pData, OutputStream pBuffer) Writes the response header and the response to the
output stream. |
void | writeResponseHeader(RequestData pData, int pContentLength) Writes the response header to the output stream. |
Parameters: pWebServer The webserver maintaining this connection. pServer The server being used to execute requests. pSocket The server socket to handle; the Connection
is responsible for closing this socket.
Throws: IOException
Parameters: pData The request data. pError The error being reported. pStream The {@link ByteArrayOutputStream} with the error response.
Throws: IOException Writing the response failed.
Parameters: pData The request data. pError The error being reported. pContentLength The response length, if known, or -1.
Throws: IOException Writing the response failed.
Parameters: pData The request data. pBuffer The {@link ByteArrayOutputStream} holding the response.
Throws: IOException Writing the response failed.
Parameters: pData The request data pContentLength The content length, if known, or -1.
Throws: IOException Writing the response failed.