public final class HttpConnectionThread
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CRLF
HTTP standard byte sequence for end-of-line.
|
| Constructor and Description |
|---|
HttpConnectionThread(java.net.Socket socket,
java.util.Map<java.lang.String,PathHandler> pathToHandlerMap,
HttpServer serverInstance) |
| Modifier and Type | Method and Description |
|---|---|
HttpServer |
getServerInstance()
Get the server instance associated with this thread.
|
void |
run() |
void |
sendError(int error,
java.lang.Object... args)
Produce an HTTP error page with the specified HTTP response error code.
|
public static final java.lang.String CRLF
public HttpConnectionThread(java.net.Socket socket,
java.util.Map<java.lang.String,PathHandler> pathToHandlerMap,
HttpServer serverInstance)
throws java.io.IOException
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnablepublic void sendError(int error,
java.lang.Object... args)
error - error code (as defined by the HTTP RFC)args - other text to be printed after the error code numberHttpURLConnectionpublic HttpServer getServerInstance()