Class HttpSender
- java.lang.Object
-
- org.eclipse.jetty.client.HttpSender
-
- All Implemented Interfaces:
java.util.EventListener
,AsyncContentProvider.Listener
- Direct Known Subclasses:
HttpSenderOverHTTP
@Deprecated(since="2021-05-27") public abstract class HttpSender extends java.lang.Object implements AsyncContentProvider.Listener
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.HttpSender
abstracts the algorithm to send HTTP requests, so that subclasses only implement the transport-specific code to send requests over the wire, implementingsendHeaders(HttpExchange, HttpContent, Callback)
andsendContent(HttpExchange, HttpContent, Callback)
.HttpSender
governs two state machines.The request state machine is updated by
HttpSender
as the various steps of sending a request are executed, seeRequestState
. 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 toRequestState#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.The sender state machine is updated by
HttpSender
from three sources: deferred content notifications (viaonContent()
), 100-continue notifications (viaproceed(HttpExchange, Throwable)
) and normal request send (viasendContent(HttpExchange, HttpContent, Callback)
). This state machine must guarantee that the request sending is never executed concurrently: only one of those sources may trigger the call tosendContent(HttpExchange, HttpContent, Callback)
.- See Also:
HttpReceiver
-
-
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.void
onContent()
Deprecated.Callback method invoked when content is availablevoid
proceed(HttpExchange exchange, java.lang.Throwable failure)
Deprecated.void
send(HttpExchange exchange)
Deprecated.java.lang.String
toString()
Deprecated.
-
-
-
Method Detail
-
isFailed
public boolean isFailed()
Deprecated.
-
onContent
public void onContent()
Deprecated.Description copied from interface:AsyncContentProvider.Listener
Callback method invoked when content is available- Specified by:
onContent
in interfaceAsyncContentProvider.Listener
-
send
public void send(HttpExchange exchange)
Deprecated.
-
proceed
public void proceed(HttpExchange exchange, java.lang.Throwable failure)
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
-
-