org.cybergarage.http

## Class HTTPServerThread

- java.lang.Object
- - java.lang.Thread
  - - org.cybergarage.http.HTTPServerThread

- All Implemented Interfaces:
    Runnable

      public class HTTPServerThread
      extends Thread

  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 java.lang.Thread

      `Thread.State, Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HTTPServerThread(HTTPServer httpServer, Socket sock)` Creates a new HTTPServerThread to handle a client connection.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()` Runs the thread to handle HTTP requests from the client.

    - ### Methods inherited from class java.lang.Thread

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### HTTPServerThread

          public HTTPServerThread(HTTPServer httpServer,
                                  Socket sock)

      Creates a new HTTPServerThread to handle a client connection.
      Parameters:
        `httpServer` - the HTTPServer that will handle the requests
        `sock` - the client socket

  - ### Method Detail

    - #### run

          public void run()

      Runs the thread to handle HTTP requests from the client. Reads requests continuously until the connection is closed or keep-alive is not requested.
      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `Thread`