Interface HttpServer.BodyWriter
- Enclosing class:
HttpServer
public static interface HttpServer.BodyWriter
Generates a response on the serving worker, with bounded transport buffering.
Open sources inside writeTo and close them with try-with-resources. The server
invokes this only for responses that carry a body, never for HEAD or a bodiless
status. Capture request values in the handler; do not retain the Request or output.
A disconnect, reset or socket timeout makes writes throw IOException; let it
propagate so generation stops and source cleanup runs. No temporary files or
producer threads are created. Closing output flushes it, but not the connection.
-
Method Summary
-
Method Details
-
writeTo
- Throws:
IOException
-