Package | Description |
---|---|
org.springframework.web.reactive.function.server |
Provides the types that make up Spring's functional web framework.
|
Modifier and Type | Interface and Description |
---|---|
interface |
HandlerFilterFunction<T extends ServerResponse,R extends ServerResponse>
Represents a function that filters a handler function.
|
interface |
HandlerFilterFunction<T extends ServerResponse,R extends ServerResponse>
Represents a function that filters a handler function.
|
interface |
HandlerFunction<T extends ServerResponse>
Represents a function that handles a request.
|
interface |
RouterFunction<T extends ServerResponse>
Represents a function that routes to a handler function.
|
Modifier and Type | Interface and Description |
---|---|
interface |
EntityResponse<T>
Entity-specific subtype of
ServerResponse that exposes entity data. |
interface |
RenderingResponse
Rendering-specific subtype of
ServerResponse that exposes model and template data. |
Modifier and Type | Method and Description |
---|---|
default <S extends ServerResponse> |
RouterFunction.filter(HandlerFilterFunction<T,S> filterFunction)
Filter all handler functions routed by this function with the given
filter function.
|
static <T extends ServerResponse> |
RouterFunctions.nest(RequestPredicate predicate,
RouterFunction<T> routerFunction)
Route to the given router function if the given request predicate applies.
|
static <T extends ServerResponse,R extends ServerResponse> |
HandlerFilterFunction.ofResponseProcessor(java.util.function.Function<T,reactor.core.publisher.Mono<R>> responseProcessor)
Adapt the given response processor function to a filter function that only operates
on the
ClientResponse . |
static <T extends ServerResponse,R extends ServerResponse> |
HandlerFilterFunction.ofResponseProcessor(java.util.function.Function<T,reactor.core.publisher.Mono<R>> responseProcessor)
Adapt the given response processor function to a filter function that only operates
on the
ClientResponse . |
static <T extends ServerResponse> |
RouterFunctions.route(RequestPredicate predicate,
HandlerFunction<T> handlerFunction)
Route to the given handler function if the given request predicate applies.
|
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.BodyBuilder.body(BodyInserter<?,? super ServerHttpResponse> inserter)
Set the body of the response to the given
BodyInserter and return it. |
<T,P extends org.reactivestreams.Publisher<T>> |
ServerResponse.BodyBuilder.body(P publisher,
java.lang.Class<T> elementClass)
Set the body of the response to the given asynchronous
Publisher and return it. |
<T,P extends org.reactivestreams.Publisher<T>> |
ServerResponse.BodyBuilder.body(P publisher,
ParameterizedTypeReference<T> typeReference)
Set the body of the response to the given asynchronous
Publisher and return it. |
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.HeadersBuilder.build()
Build the response entity with no body.
|
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.HeadersBuilder.build(java.util.function.BiFunction<ServerWebExchange,ServerResponse.Context,reactor.core.publisher.Mono<java.lang.Void>> writeFunction)
Build the response entity with a custom writer function.
|
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.HeadersBuilder.build(org.reactivestreams.Publisher<java.lang.Void> voidPublisher)
Build the response entity with no body.
|
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.BodyBuilder.render(java.lang.String name,
java.util.Map<java.lang.String,?> model)
Render the template with the given
name using the given model . |
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.BodyBuilder.render(java.lang.String name,
java.lang.Object... modelAttributes)
Render the template with the given
name using the given modelAttributes . |
static RouterFunction<ServerResponse> |
RouterFunctions.resources(java.util.function.Function<ServerRequest,reactor.core.publisher.Mono<Resource>> lookupFunction)
Route to resources using the provided lookup function.
|
static RouterFunction<ServerResponse> |
RouterFunctions.resources(java.lang.String pattern,
Resource location)
Route requests that match the given pattern to resources relative to the given root location.
|
reactor.core.publisher.Mono<ServerResponse> |
ServerResponse.BodyBuilder.syncBody(java.lang.Object body)
Set the body of the response to the given synchronous
Object and return it. |
Modifier and Type | Method and Description |
---|---|
static ServerResponse.BodyBuilder |
ServerResponse.from(ServerResponse other)
Create a builder with the status code and headers of the given response.
|