Constructs a new server using the supplied handler to handle all incoming requests, as well as a supplied request worker pool.
Constructs a new server using the supplied handler to handle all incoming requests.
Constructs a new server using the supplied handler function to handle all incoming requests.
Gets the configured exception handler for any exceptions that occur during request handling.
Gets the configured handler for requests.
Gets the server's websocket manager, used to register new websocket connections, or to broadcast a message to all connected websockets.
Tells whether the server is ready to receive requests. This loads the ready status safely for access by multiple threads.
Attempts to revive a dead websocket manager thread by simply replacing it with a new one and starting that. This is only meant as a means to minimize damage when there's a severe bug in websocket logic.
Sets the server's exception handler.
Starts the server on the calling thread, so that it will begin accepting HTTP requests. Once the server is able to accept requests, isReady() will return true, and will remain true until the server is stopped by calling stop(). This can be thought of as the "main loop" of the server.
Starts the server running in a new thread.
Shuts down the server by closing the server socket, if possible. This will block until all pending requests have been fulfilled.
The server's configuration values.
A simple HTTP server that accepts requests on a given port and address, and lets a configured HttpRequestHandler produce a response, to send back to the client.