class ReactorServerHttpResponse extends AbstractServerHttpResponse implements ZeroCopyHttpOutputMessage
ServerHttpResponse
to the HttpServerResponse
.Modifier and Type | Field and Description |
---|---|
private HttpServerResponse |
response |
Constructor and Description |
---|
ReactorServerHttpResponse(HttpServerResponse response,
DataBufferFactory bufferFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyCookies()
Add cookies from
AbstractServerHttpResponse.getHeaders() to the underlying response. |
protected void |
applyHeaders()
Apply header changes from
AbstractServerHttpResponse.getHeaders() to the underlying response. |
protected void |
applyStatusCode()
Write the status code to the underlying response.
|
<T> T |
getNativeResponse()
Return the underlying server response.
|
private static <any> |
toByteBufs(<any> dataBuffers) |
protected <any> |
writeAndFlushWithInternal(<any> publisher)
Write to the underlying the response, and flush after each
Publisher<DataBuffer> . |
<any> |
writeWith(java.io.File file,
long position,
long count)
Use the given
File to write the body of the message to the underlying
HTTP layer. |
protected <any> |
writeWithInternal(<any> publisher)
Write to the underlying the response.
|
addCookie, beforeCommit, bufferFactory, doCommit, doCommit, getCookies, getHeaders, getStatusCode, getStatusCodeValue, isCommitted, setComplete, setStatusCode, setStatusCodeValue, writeAndFlushWith, writeWith
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beforeCommit, bufferFactory, isCommitted, setComplete, writeAndFlushWith, writeWith
getHeaders
public ReactorServerHttpResponse(HttpServerResponse response, DataBufferFactory bufferFactory)
public <T> T getNativeResponse()
AbstractServerHttpResponse
Note: This is exposed mainly for internal framework use such as WebSocket upgrades in the spring-webflux module.
getNativeResponse
in class AbstractServerHttpResponse
protected void applyStatusCode()
AbstractServerHttpResponse
applyStatusCode
in class AbstractServerHttpResponse
protected <any> writeWithInternal(<any> publisher)
AbstractServerHttpResponse
writeWithInternal
in class AbstractServerHttpResponse
publisher
- the publisher to write withprotected <any> writeAndFlushWithInternal(<any> publisher)
AbstractServerHttpResponse
Publisher<DataBuffer>
.writeAndFlushWithInternal
in class AbstractServerHttpResponse
publisher
- the publisher to write and flush withprotected void applyHeaders()
AbstractServerHttpResponse
AbstractServerHttpResponse.getHeaders()
to the underlying response.
This method is called once only.applyHeaders
in class AbstractServerHttpResponse
protected void applyCookies()
AbstractServerHttpResponse
AbstractServerHttpResponse.getHeaders()
to the underlying response.
This method is called once only.applyCookies
in class AbstractServerHttpResponse
public <any> writeWith(java.io.File file, long position, long count)
ZeroCopyHttpOutputMessage
File
to write the body of the message to the underlying
HTTP layer.writeWith
in interface ZeroCopyHttpOutputMessage
file
- the file to transferposition
- the position within the file from which the transfer is to begincount
- the number of bytes to be transferredprivate static <any> toByteBufs(<any> dataBuffers)