Class HttpSenderOverHTTP
java.lang.Object
org.eclipse.jetty.client.HttpSender
org.eclipse.jetty.client.http.HttpSenderOverHTTP
- All Implemented Interfaces:
EventListener, AsyncContentProvider.Listener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpGeneratorprivate final HttpClientprivate booleanFields inherited from class HttpSender
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispose()protected booleanprotected voidreset()protected voidsendContent(HttpExchange exchange, HttpContent content, Callback callback) Implementations should send the content at theHttpContentcursor position over the wire.protected voidsendHeaders(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 givencallbackof the result of this operation.private voidtoString()Methods inherited from class HttpSender
abort, beginToHeaders, expects100Continue, getHttpExchange, headersToCommit, isFailed, onContent, proceed, queuedToBegin, send, someToContent, someToSuccess
-
Field Details
-
generator
-
httpClient
-
shutdown
private boolean shutdown
-
-
Constructor Details
-
HttpSenderOverHTTP
-
-
Method Details
-
getHttpChannel
- Overrides:
getHttpChannelin classHttpSender
-
sendHeaders
Description copied from class:HttpSenderImplementations should send the HTTP headers over the wire, possibly with some content, in a single write, and notify the givencallbackof the result of this operation.If there is more content to send, then
HttpSender.sendContent(HttpExchange, HttpContent, Callback)will be invoked.- Specified by:
sendHeadersin classHttpSender- Parameters:
exchange- the exchange to sendcontent- the content to sendcallback- the callback to notify
-
sendContent
Description copied from class:HttpSenderImplementations should send the content at theHttpContentcursor position over the wire.The
HttpContentcursor 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 theHttpContentcursor 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:
sendContentin classHttpSender- Parameters:
exchange- the exchange to sendcontent- the content to sendcallback- the callback to notify
-
reset
protected void reset()- Overrides:
resetin classHttpSender
-
dispose
protected void dispose()- Overrides:
disposein classHttpSender
-
shutdownOutput
private void shutdownOutput() -
isShutdown
protected boolean isShutdown() -
toString
- Overrides:
toStringin classHttpSender
-