Package org.eclipse.jetty.client.http
Class HttpSenderOverHTTP
- java.lang.Object
-
- org.eclipse.jetty.client.HttpSender
-
- org.eclipse.jetty.client.http.HttpSenderOverHTTP
-
- All Implemented Interfaces:
java.util.EventListener
,AsyncContentProvider.Listener
public class HttpSenderOverHTTP extends HttpSender
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.client.HttpSender
LOG
-
-
Constructor Summary
Constructors Constructor Description HttpSenderOverHTTP(HttpChannelOverHTTP channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
HttpChannelOverHTTP
getHttpChannel()
protected boolean
isShutdown()
protected void
reset()
protected void
sendContent(HttpExchange exchange, HttpContent content, Callback callback)
Implementations should send the content at theHttpContent
cursor position over the wire.protected void
sendHeaders(HttpExchange exchange, HttpContent content, Callback callback)
Implementations should send the HTTP headers over the wire, possibly with some content, in a single write, and notify the givencallback
of the result of this operation.java.lang.String
toString()
-
Methods inherited from class org.eclipse.jetty.client.HttpSender
abort, beginToHeaders, expects100Continue, getHttpExchange, headersToCommit, isFailed, onContent, proceed, queuedToBegin, send, someToContent, someToSuccess
-
-
-
-
Constructor Detail
-
HttpSenderOverHTTP
public HttpSenderOverHTTP(HttpChannelOverHTTP channel)
-
-
Method Detail
-
getHttpChannel
public HttpChannelOverHTTP getHttpChannel()
- Overrides:
getHttpChannel
in classHttpSender
-
sendHeaders
protected void sendHeaders(HttpExchange exchange, HttpContent content, Callback callback)
Description copied from class:HttpSender
Implementations should send the HTTP headers over the wire, possibly with some content, in a single write, and notify the givencallback
of the result of this operation.If there is more content to send, then
HttpSender.sendContent(HttpExchange, HttpContent, Callback)
will be invoked.- Specified by:
sendHeaders
in classHttpSender
- Parameters:
exchange
- the exchange to sendcontent
- the content to sendcallback
- the callback to notify
-
sendContent
protected void sendContent(HttpExchange exchange, HttpContent content, Callback callback)
Description copied from class:HttpSender
Implementations should send the content at theHttpContent
cursor position over the wire.The
HttpContent
cursor is advanced by HttpSender at the right time, and if more content needs to be sent, this method is invoked again; subclasses need only to send the content at theHttpContent
cursor position.This method is invoked one last time when
HttpContent.isConsumed()
is true and therefore there is no actual content to send. This is done to allow subclasses to write "terminal" bytes (such as the terminal chunk when the transfer encoding is chunked) if their protocol needs to.- Specified by:
sendContent
in classHttpSender
- Parameters:
exchange
- the exchange to sendcontent
- the content to sendcallback
- the callback to notify
-
reset
protected void reset()
- Overrides:
reset
in classHttpSender
-
dispose
protected void dispose()
- Overrides:
dispose
in classHttpSender
-
isShutdown
protected boolean isShutdown()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classHttpSender
-
-