public interface ReactiveHttpOutputMessage extends HttpMessage
Publisher.
Typically implemented by an HTTP request on the client-side or a response on the server-side.
| Modifier and Type | Method and Description |
|---|---|
void |
beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
Register an action to be applied just before the message is committed.
|
DataBufferFactory |
bufferFactory()
Returns a
DataBufferFactory that can be used for creating the body. |
reactor.core.publisher.Mono<Void> |
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). |
reactor.core.publisher.Mono<Void> |
writeAndFlushWith(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> body)
Use the given
Publisher of Publishers to write the body of the
message to the underlying HTTP layer, flushing after each
Publisher<DataBuffer>. |
reactor.core.publisher.Mono<Void> |
writeWith(org.reactivestreams.Publisher<DataBuffer> body)
Use the given
Publisher to write the body of the message to the underlying
HTTP layer. |
getHeadersvoid beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
action - the actionreactor.core.publisher.Mono<Void> writeWith(org.reactivestreams.Publisher<DataBuffer> body)
Publisher to write the body of the message to the underlying
HTTP layer.body - the body content publisherreactor.core.publisher.Mono<Void> writeAndFlushWith(org.reactivestreams.Publisher<org.reactivestreams.Publisher<DataBuffer>> body)
Publisher of Publishers to write the body of the
message to the underlying HTTP layer, flushing after each
Publisher<DataBuffer>.body - the body content publisherDataBufferFactory bufferFactory()
DataBufferFactory that can be used for creating the body.writeWith(Publisher)reactor.core.publisher.Mono<Void> setComplete()
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.