public class RxNettyServerHttpResponse extends AbstractServerHttpResponse
ServerHttpResponse
to the RxNetty HttpServerResponse
.Constructor and Description |
---|
RxNettyServerHttpResponse(io.reactivex.netty.protocol.http.server.HttpServerResponse<io.netty.buffer.ByteBuf> response,
NettyDataBufferFactory dataBufferFactory) |
Modifier and Type | Method and Description |
---|---|
io.reactivex.netty.protocol.http.server.HttpServerResponse<?> |
getRxNettyResponse() |
protected reactor.core.publisher.Mono<Void> |
writeAndFlushWithInternal(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> body)
Implement this method to write to the underlying the response, and flush after
each
Publisher<DataBuffer> . |
protected void |
writeCookies()
Implement this method to add cookies from
AbstractServerHttpResponse.getHeaders() to the
underlying response. |
protected void |
writeHeaders()
Implement this method to apply header changes from
AbstractServerHttpResponse.getHeaders()
to the underlying response. |
protected void |
writeStatusCode()
Implement this method to write the status code to the underlying response.
|
protected reactor.core.publisher.Mono<Void> |
writeWithInternal(org.reactivestreams.Publisher<DataBuffer> body)
Implement this method to write to the underlying the response.
|
applyBeforeCommit, beforeCommit, bufferFactory, getCookies, getHeaders, getStatusCode, setComplete, setStatusCode, writeAndFlushWith, writeWith
public RxNettyServerHttpResponse(io.reactivex.netty.protocol.http.server.HttpServerResponse<io.netty.buffer.ByteBuf> response, NettyDataBufferFactory dataBufferFactory)
public io.reactivex.netty.protocol.http.server.HttpServerResponse<?> getRxNettyResponse()
protected void writeStatusCode()
AbstractServerHttpResponse
writeStatusCode
in class AbstractServerHttpResponse
protected reactor.core.publisher.Mono<Void> writeWithInternal(org.reactivestreams.Publisher<DataBuffer> body)
AbstractServerHttpResponse
writeWithInternal
in class AbstractServerHttpResponse
body
- the publisher to write withprotected reactor.core.publisher.Mono<Void> writeAndFlushWithInternal(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> body)
AbstractServerHttpResponse
Publisher<DataBuffer>
.writeAndFlushWithInternal
in class AbstractServerHttpResponse
body
- the publisher to write and flush withprotected void writeHeaders()
AbstractServerHttpResponse
AbstractServerHttpResponse.getHeaders()
to the underlying response. This method is called once only.writeHeaders
in class AbstractServerHttpResponse
protected void writeCookies()
AbstractServerHttpResponse
AbstractServerHttpResponse.getHeaders()
to the
underlying response. This method is called once only.writeCookies
in class AbstractServerHttpResponse