private static class MultipartHttpMessageWriter.MultipartHttpOutputMessage extends java.lang.Object implements ReactiveHttpOutputMessage
Modifier and Type | Field and Description |
---|---|
private <any> |
body |
private DataBufferFactory |
bufferFactory |
private java.nio.charset.Charset |
charset |
private java.util.concurrent.atomic.AtomicBoolean |
committed |
private HttpHeaders |
headers |
Constructor and Description |
---|
MultipartHttpOutputMessage(DataBufferFactory bufferFactory,
java.nio.charset.Charset charset) |
Modifier and Type | Method and Description |
---|---|
void |
beforeCommit(java.util.function.Supplier<? extends <any>> action)
Register an action to apply just before the HttpOutputMessage is committed.
|
DataBufferFactory |
bufferFactory()
Return a
DataBufferFactory that can be used to create the body. |
private DataBuffer |
generateHeaders() |
<any> |
getBody() |
HttpHeaders |
getHeaders()
Return the headers of this message.
|
boolean |
isCommitted()
Whether the HttpOutputMessage is committed.
|
<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 HttpOutputMessage 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. |
private final DataBufferFactory bufferFactory
private final java.nio.charset.Charset charset
private final HttpHeaders headers
private final java.util.concurrent.atomic.AtomicBoolean committed
@Nullable private <any> body
public MultipartHttpOutputMessage(DataBufferFactory bufferFactory, java.nio.charset.Charset charset)
public HttpHeaders getHeaders()
HttpMessage
getHeaders
in interface HttpMessage
null
)public DataBufferFactory bufferFactory()
ReactiveHttpOutputMessage
DataBufferFactory
that can be used to create the body.bufferFactory
in interface ReactiveHttpOutputMessage
#writeWith(Publisher)
public void beforeCommit(java.util.function.Supplier<? extends <any>> action)
ReactiveHttpOutputMessage
beforeCommit
in interface ReactiveHttpOutputMessage
action
- the action to applypublic boolean isCommitted()
ReactiveHttpOutputMessage
isCommitted
in interface ReactiveHttpOutputMessage
public <any> writeWith(<any> body)
ReactiveHttpOutputMessage
Publisher
to write the body of the message to the
underlying HTTP layer.writeWith
in interface ReactiveHttpOutputMessage
body
- the body content publisherMono
that indicates completion or errorprivate DataBuffer generateHeaders()
public <any> writeAndFlushWith(<any> body)
ReactiveHttpOutputMessage
Publisher
of Publishers
to write the body
of the HttpOutputMessage to the underlying HTTP layer, flushing after
each Publisher<DataBuffer>
.writeAndFlushWith
in interface ReactiveHttpOutputMessage
body
- the body content publisherMono
that indicates completion or errorpublic <any> getBody()
public <any> setComplete()
ReactiveHttpOutputMessage
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.
setComplete
in interface ReactiveHttpOutputMessage
Mono
that indicates completion or error