Top Description Inners Methods
org.springframework.web.reactive.function

public Interface BodyInserter<T, M extends ReactiveHttpOutputMessage>

Known Direct Subinterfaces
org.springframework.web.reactive.function.BodyInserters.FormInserter
Annotations
@FunctionalInterface
Type Parameters
<T>
the type of data to insert
<M>
the type of ReactiveHttpOutputMessage this inserter can be applied to
Imports
java.util.List, .Map, .Optional, reactor.core.publisher.Mono, org.springframework.http.ReactiveHttpOutputMessage, org.springframework.http.codec.HttpMessageWriter, org.springframework.http.server.reactive.ServerHttpRequest

A combination of functions that can populate a ReactiveHttpOutputMessage body.
Author
Arjen Poutsma
Since
5.0
See Also
BodyInserters

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
BodyInserter.Context

Defines the context used during the insertion.

Method Summary

Modifier and TypeMethod and Description
public Mono<Void>

Returns:

a Mono that indicates completion or error
insert
(M
the response to insert into
outputMessage
,
BodyInserter.Context
the context to use
context
)

Insert into the given output message.

Method Detail

insertback to summary
public Mono<Void> insert(M outputMessage, BodyInserter.Context context)

Insert into the given output message.

Parameters
outputMessage:M

the response to insert into

context:BodyInserter.Context

the context to use

Returns:Mono<Void>

a Mono that indicates completion or error

org.springframework.web.reactive.function back to summary

public Interface BodyInserter.Context


Defines the context used during the insertion.

Method Summary

Modifier and TypeMethod and Description
public Map<String, Object>
hints()

Return the map of hints to use for response body conversion.

public List<HttpMessageWriter<?>>

Returns:

the stream of message writers
messageWriters
()

Return the HttpMessageWriters to be used for response body conversion.

public Optional<ServerHttpRequest>
serverRequest()

Optionally return the ServerHttpRequest, if present.

Method Detail

hintsback to summary
public Map<String, Object> hints()

Return the map of hints to use for response body conversion.

messageWritersback to summary
public List<HttpMessageWriter<?>> messageWriters()

Return the HttpMessageWriters to be used for response body conversion.

Returns:List<HttpMessageWriter<?>>

the stream of message writers

serverRequestback to summary
public Optional<ServerHttpRequest> serverRequest()

Optionally return the ServerHttpRequest, if present.