public class ReactorServerHttpResponse extends AbstractServerHttpResponse implements ZeroCopyHttpOutputMessage
ServerHttpResponse
to the Reactor Net HttpChannel
.Constructor and Description |
---|
ReactorServerHttpResponse(reactor.ipc.netty.http.HttpChannel response,
DataBufferFactory bufferFactory) |
Modifier and Type | Method and Description |
---|---|
reactor.ipc.netty.http.HttpChannel |
getReactorChannel() |
protected reactor.core.publisher.Mono<Void> |
writeAndFlushWithInternal(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> publisher)
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.
|
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. |
protected reactor.core.publisher.Mono<Void> |
writeWithInternal(org.reactivestreams.Publisher<DataBuffer> publisher)
Implement this method to write to the underlying the response.
|
applyBeforeCommit, beforeCommit, bufferFactory, getCookies, getHeaders, getStatusCode, setComplete, setStatusCode, writeAndFlushWith, writeWith
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beforeCommit, bufferFactory, setComplete, writeAndFlushWith, writeWith
getHeaders
public ReactorServerHttpResponse(reactor.ipc.netty.http.HttpChannel response, DataBufferFactory bufferFactory)
public reactor.ipc.netty.http.HttpChannel getReactorChannel()
protected void writeStatusCode()
AbstractServerHttpResponse
writeStatusCode
in class AbstractServerHttpResponse
protected reactor.core.publisher.Mono<Void> writeWithInternal(org.reactivestreams.Publisher<DataBuffer> publisher)
AbstractServerHttpResponse
writeWithInternal
in class AbstractServerHttpResponse
publisher
- the publisher to write withprotected reactor.core.publisher.Mono<Void> writeAndFlushWithInternal(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> publisher)
AbstractServerHttpResponse
Publisher<DataBuffer>
.writeAndFlushWithInternal
in class AbstractServerHttpResponse
publisher
- 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
public reactor.core.publisher.Mono<Void> writeWith(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 transferred