RouterFunctions.Builder .
| Modifier and Type | Class and Description |
|---|---|
| private static class | RouterFunctionBuilder.
Router function returned by |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final List | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public RouterFunctions. | add(RouterFunction<ServerResponse>
the router function to be added routerFunction)Implements org. Adds the given route to this builder. |
| private RouterFunctions. | |
| public RouterFunctions. | after(BiFunction<ServerRequest, ServerResponse, ServerResponse>
a function that transforms the response responseProcessor)Implements org. Filter the response object for all routes created by this builder with the given response processing function. |
| public RouterFunctions. | before(Function<ServerRequest, ServerRequest>
a function that transforms the request requestProcessor)Implements org. Filter the request object for all routes created by this builder with the given request processing function. |
| public RouterFunction | build()
Implements org. Builds the |
| public RouterFunctions. | DELETE(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)DELETE requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | DELETE(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)DELETE requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | DELETE(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)DELETE requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | DELETE(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)DELETE requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | filter(HandlerFilterFunction<ServerResponse, ServerResponse>
the function to filter all routes built by this builder filterFunction)Implements org. Filters all routes created by this builder with the given filter function. |
| public RouterFunctions. | GET(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)GET requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | GET(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)GET requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | GET(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)GET requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | GET(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)GET requests that
match pattern and the predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | HEAD(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)HEAD requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | HEAD(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)HEAD requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | HEAD(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)HEAD requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | HEAD(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)HEAD requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | nest(RequestPredicate
the predicate to test predicate, Consumer<RouterFunctions.consumer for a builderConsumerBuilder that provides the nested router
functionImplements org. Route to a built router function if the given request predicate applies. |
| public RouterFunctions. | nest(RequestPredicate
the predicate to test predicate, Supplier<RouterFunction<ServerResponse>> supplier for the nested router function to delegate to if
the predicate applies routerFunctionSupplier)Implements org. Route to the supplied router function if the given request predicate applies. |
| public RouterFunctions. | onError(Predicate<? super Throwable>
the type of exception to filter predicate, BiFunction<? super Throwable, ServerRequest, Mono<ServerResponse>> a function that creates a response responseProvider)Implements org. Filters all exceptions that match the predicate by applying the given response provider function. |
| public <T extends Throwable> RouterFunctions. | onError(Class<T>
the type of exception to filter exceptionType, BiFunction<? super T, ServerRequest, Mono<ServerResponse>> a function that creates a response responseProvider)Implements org. Filters all exceptions of the given type by applying the given response provider function. |
| public RouterFunctions. | OPTIONS(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)OPTIONS requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | OPTIONS(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)OPTIONS requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | OPTIONS(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)OPTIONS requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | OPTIONS(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)OPTIONS requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | PATCH(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)PATCH requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | PATCH(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)PATCH requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | PATCH(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)PATCH requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | PATCH(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)PATCH requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | path(String
the pattern to match to pattern, Consumer<RouterFunctions.consumer for a builderConsumerBuilder that provides the nested router
functionImplements org. Route to a built router function if the given path prefix pattern applies. |
| public RouterFunctions. | path(String
the pattern to match to pattern, Supplier<RouterFunction<ServerResponse>> supplier for the nested router function to delegate to if
the pattern matches routerFunctionSupplier)Implements org. Route to the supplied router function if the given path prefix pattern applies. |
| public RouterFunctions. | POST(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)POST requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | POST(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)POST requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | POST(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)POST requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | POST(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)POST requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | PUT(HandlerFunction<ServerResponse>
the handler function to handle all handlerFunction)PUT requestsImplements org. Adds a route to the given handler function that handles HTTP |
| public RouterFunctions. | PUT(RequestPredicate
predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)PUT requests that
match predicateImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | PUT(String
the pattern to match to pattern, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)PUT requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | PUT(String
the pattern to match to pattern, RequestPredicate additional predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all handlerFunction)PUT requests that
match patternImplements org. Adds a route to the given handler function that handles all HTTP |
| public RouterFunctions. | resource(RequestPredicate
predicate to match predicate, Resource the resources to serve resource)Implements org. Route requests that match the given predicate to the given resource. |
| public RouterFunctions. | resource(RequestPredicate
predicate to match predicate, Resource the resources to serve resource, BiConsumer<Resource, HttpHeaders> provides access to the HTTP headers for served resources headersConsumer)Implements org. Route requests that match the given predicate to the given resource. |
| public RouterFunctions. | resources(String
the pattern to match pattern, Resource the location directory relative to which resources should be resolved location)Implements org. Route requests that match the given pattern to resources relative to the given root location. |
| public RouterFunctions. | resources(String
the pattern to match pattern, Resource the location directory relative to which resources should be resolved location, BiConsumer<Resource, HttpHeaders> provides access to the HTTP headers for served resources headersConsumer)Implements org. Route requests that match the given pattern to resources relative to the given root location. |
| public RouterFunctions. | resources(Function<ServerRequest, Mono<Resource>>
the function to provide a lookupFunction)Resource given the ServerRequestImplements org. Route to resources using the provided lookup function. |
| public RouterFunctions. | resources(Function<ServerRequest, Mono<Resource>>
the function to provide a lookupFunction, BiConsumer<Resource, HttpHeaders> Resource given the ServerRequestprovides access to the HTTP headers for served resources headersConsumer)Implements org. Route to resources using the provided lookup function. |
| public RouterFunctions. | route(RequestPredicate
the request predicate to match predicate, HandlerFunction<ServerResponse> the handler function to handle all requests that match the predicate handlerFunction)Implements org. Adds a route to the given handler function that handles all requests that match the given predicate. |
| public RouterFunctions. | withAttribute(String
the attribute name name, Object the attribute value value)Implements org. Add an attribute with the given name and value to the last route built with this builder. |
| public RouterFunctions. | withAttributes(Consumer<Map<String, Object>>
a function that consumes the attributes map attributesConsumer)Implements org. Manipulate the attributes of the last route built with the given consumer. |