public class UndertowServerHttpResponse extends AbstractListenerServerHttpResponse implements ZeroCopyHttpOutputMessage
ServerHttpResponse to the Undertow HttpServerExchange.| Constructor and Description |
|---|
UndertowServerHttpResponse(io.undertow.server.HttpServerExchange exchange,
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.
|
protected org.reactivestreams.Processor<? super org.reactivestreams.Publisher<? extends DataBuffer>,Void> |
createBodyFlushProcessor()
Abstract template method to create a
Processor<Publisher<DataBuffer>, Void>
that will write the response body with flushes to the underlying output. |
io.undertow.server.HttpServerExchange |
getUndertowExchange() |
reactor.core.publisher.Mono<Void> |
writeWith(File file,
long position,
long count)
Use the given
File to write the body of the message to the underlying
HTTP layer. |
writeAndFlushWithInternal, writeWithInternaladdCookie, beforeCommit, bufferFactory, doCommit, doCommit, getCookies, getHeaders, getStatusCode, isCommitted, setComplete, setStatusCode, writeAndFlushWith, writeWithclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeCommit, bufferFactory, isCommitted, setComplete, writeAndFlushWith, writeWithgetHeaderspublic UndertowServerHttpResponse(io.undertow.server.HttpServerExchange exchange,
DataBufferFactory bufferFactory)
public io.undertow.server.HttpServerExchange getUndertowExchange()
protected void applyStatusCode()
AbstractServerHttpResponseapplyStatusCode in class AbstractServerHttpResponseprotected void applyHeaders()
AbstractServerHttpResponseAbstractServerHttpResponse.getHeaders() to the underlying response.
This method is called once only.applyHeaders in class AbstractServerHttpResponseprotected void applyCookies()
AbstractServerHttpResponseAbstractServerHttpResponse.getHeaders() to the underlying response.
This method is called once only.applyCookies in class AbstractServerHttpResponsepublic reactor.core.publisher.Mono<Void> writeWith(File file, long position, long count)
ZeroCopyHttpOutputMessageFile to write the body of the message to the underlying
HTTP layer.writeWith in interface ZeroCopyHttpOutputMessagefile - the file to transferposition - the position within the file from which the transfer is to begincount - the number of bytes to be transferredprotected org.reactivestreams.Processor<? super org.reactivestreams.Publisher<? extends DataBuffer>,Void> createBodyFlushProcessor()
AbstractListenerServerHttpResponseProcessor<Publisher<DataBuffer>, Void>
that will write the response body with flushes to the underlying output. Called from
AbstractListenerServerHttpResponse.writeAndFlushWithInternal(Publisher).createBodyFlushProcessor in class AbstractListenerServerHttpResponse