class JettyClientHttpRequest extends AbstractClientHttpRequest
ClientHttpRequest
implementation for the Jetty ReactiveStreams HTTP client.Modifier and Type | Field and Description |
---|---|
private DataBufferFactory |
bufferFactory |
private Request |
jettyRequest |
private ReactiveRequest |
reactiveRequest |
Constructor and Description |
---|
JettyClientHttpRequest(Request jettyRequest,
DataBufferFactory bufferFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyCookies()
Add cookies from
AbstractClientHttpRequest.getHeaders() to the underlying response. |
protected void |
applyHeaders()
Apply header changes from
AbstractClientHttpRequest.getHeaders() to the underlying response. |
DataBufferFactory |
bufferFactory()
Return a
DataBufferFactory that can be used to create the body. |
private <any> |
completes() |
private java.lang.String |
getContentType() |
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
(package private) ReactiveRequest |
getReactiveRequest() |
java.net.URI |
getURI()
Return the URI of the request.
|
<any> |
setComplete()
Indicate that message handling is complete, allowing for any cleanup or
end-of-processing tasks to be performed such as applying header changes
made via
HttpMessage.getHeaders() to the underlying HTTP message (if not
applied already). |
private ContentChunk |
toContentChunk(DataBuffer buffer) |
<any> |
writeAndFlushWith(<any> body)
Use the given
Publisher of Publishers to write the body
of the HttpOutputMessage to the underlying HTTP layer, flushing after
each Publisher<DataBuffer> . |
<any> |
writeWith(<any> body)
Use the given
Publisher to write the body of the message to the
underlying HTTP layer. |
beforeCommit, doCommit, doCommit, getCookies, getHeaders, isCommitted
private final Request jettyRequest
private final DataBufferFactory bufferFactory
@Nullable private ReactiveRequest reactiveRequest
public JettyClientHttpRequest(Request jettyRequest, DataBufferFactory bufferFactory)
public HttpMethod getMethod()
ClientHttpRequest
public java.net.URI getURI()
ClientHttpRequest
public <any> setComplete()
ReactiveHttpOutputMessage
HttpMessage.getHeaders()
to the underlying HTTP message (if not
applied already).
This method should be automatically invoked at the end of message processing so typically applications should not have to invoke it. If invoked multiple times it should have no side effects.
Mono
that indicates completion or errorpublic DataBufferFactory bufferFactory()
ReactiveHttpOutputMessage
DataBufferFactory
that can be used to create the body.#writeWith(Publisher)
public <any> writeWith(<any> body)
ReactiveHttpOutputMessage
Publisher
to write the body of the message to the
underlying HTTP layer.body
- the body content publisherMono
that indicates completion or errorpublic <any> writeAndFlushWith(<any> body)
ReactiveHttpOutputMessage
Publisher
of Publishers
to write the body
of the HttpOutputMessage to the underlying HTTP layer, flushing after
each Publisher<DataBuffer>
.body
- the body content publisherMono
that indicates completion or errorprivate java.lang.String getContentType()
private <any> completes()
private ContentChunk toContentChunk(DataBuffer buffer)
protected void applyCookies()
AbstractClientHttpRequest
AbstractClientHttpRequest.getHeaders()
to the underlying response.
This method is called once only.applyCookies
in class AbstractClientHttpRequest
protected void applyHeaders()
AbstractClientHttpRequest
AbstractClientHttpRequest.getHeaders()
to the underlying response.
This method is called once only.applyHeaders
in class AbstractClientHttpRequest
ReactiveRequest getReactiveRequest()