Class HttpSender

java.lang.Object
org.eclipse.jetty.client.HttpSender
Direct Known Subclasses:
HttpSenderOverFCGI, HttpSenderOverHTTP, HttpSenderOverHTTP2

public abstract class HttpSender extends Object

HttpSender abstracts the algorithm to send HTTP requests, so that subclasses only implement the transport-specific code to send requests over the wire, implementing sendHeaders(HttpExchange, ByteBuffer, boolean, Callback) and sendContent(HttpExchange, ByteBuffer, boolean, Callback).

HttpSender governs the request state machines, which is updated as the various steps of sending a request are executed, see RequestState. At any point in time, a user thread may abort the request, which may (if the request has not been completely sent yet) move the request state machine to RequestState#FAILURE. The request state machine guarantees that the request steps are executed (by I/O threads) only if the request has not been failed already.

See Also: