java.lang.Object
java.lang.Thread
org.cybergarage.http.HTTPServerThread
- All Implemented Interfaces:
Runnable
A thread that handles HTTP requests for an HTTPServer. Each thread manages a single client connection, reading requests and delegating them to the server's request listeners.
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandlerField Summary
FieldsModifier and TypeFieldDescriptionprivate HTTPServerThe server handling the request.private SocketThe client connection being served.Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITYConstructor Summary
ConstructorsConstructorDescriptionHTTPServerThread(HTTPServer httpServer, Socket sock) Creates a new HTTPServerThread to handle a client connection.Method Summary
All MethodsMethods inherited from class Thread
activeCount, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, threadId, toString, yield
Field Details
httpServer
The server handling the request.sock
The client connection being served.
Constructor Details
HTTPServerThread
Creates a new HTTPServerThread to handle a client connection.- Parameters:
httpServer- the HTTPServer that will handle the requestssock- the client socket
Method Details
run