Package org.eclipse.jetty.client
Class HttpReceiver
- java.lang.Object
-
- org.eclipse.jetty.client.HttpReceiver
-
- Direct Known Subclasses:
HttpReceiverOverHTTP
@Deprecated(since="2021-05-27") public abstract class HttpReceiver extends java.lang.Object
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.HttpReceiver
provides the abstract code to implement the various steps of the receive of HTTP responses.HttpReceiver
maintains a state machine that is updated when the steps of receiving a response are executed.Subclasses must handle the transport-specific details, for example how to read from the raw socket and how to parse the bytes read from the socket. Then they have to call the methods defined in this class in the following order:
responseBegin(HttpExchange)
, when the HTTP response data containing the HTTP status code is availableresponseHeader(HttpExchange, HttpField)
, when an HTTP field is availableresponseHeaders(HttpExchange)
, when all HTTP headers are availableresponseContent(HttpExchange, ByteBuffer, Callback)
, when HTTP content is availableresponseSuccess(HttpExchange)
, when the response is successful
responseFailure(Throwable)
to indicate that the response has failed (for example, because of I/O exceptions). At any time, user threads may abort the response which will causeresponseFailure(Throwable)
to be invoked.The state machine maintained by this class ensures that the response steps are not executed by an I/O thread if the response has already been failed.
- See Also:
HttpSender
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
abort(HttpExchange exchange, java.lang.Throwable failure)
Deprecated.boolean
isFailed()
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Method Detail
-
isFailed
public boolean isFailed()
Deprecated.
-
abort
public boolean abort(HttpExchange exchange, java.lang.Throwable failure)
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-