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(java.util.function.Supplier<? extends <any>> action)
Register an action to be applied just before the message is committed.
|
DataBufferFactory |
bufferFactory()
Return a
DataBufferFactory that can be used for creating the body. |
<any> |
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). |
<any> |
writeAndFlushWith(<any> body)
Use the given
Publisher of Publishers to write the body of the
message to the underlying HTTP layer, flushing after each
Publisher<DataBuffer> . |
<any> |
writeWith(<any> body)
Use the given
Publisher to write the body of the message to the underlying
HTTP layer. |
getHeaders
DataBufferFactory bufferFactory()
DataBufferFactory
that can be used for creating the body.#writeWith(Publisher)
void beforeCommit(java.util.function.Supplier<? extends <any>> action)
action
- the action<any> writeWith(<any> body)
Publisher
to write the body of the message to the underlying
HTTP layer.body
- the body content publisherMono
that indicates completion or error<any> writeAndFlushWith(<any> 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 publisherMono
that indicates completion or error<any> 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.
Mono
that indicates completion or error