org.springframework.web.reactive.function.server

Interface HandlerFilterFunction<T extends ServerResponse,R extends ServerResponse>

    • Method Detail

      • filter

        reactor.core.publisher.Mono<R> filter(ServerRequest request,
                                              HandlerFunction<T> next)
        Apply this filter to the given handler function. The given handler function represents the next entity in the chain, and can be invoked in order to proceed to this entity, or not invoked to block the chain.
        Parameters:
        request - the request
        next - the next handler or filter function in the chain
        Returns:
        the filtered response
        See Also:
        ServerRequestWrapper
      • andThen

        default HandlerFilterFunction<T,R> andThen(HandlerFilterFunction<T,T> after)
        Return a composed filter function that first applies this filter, and then applies the after filter.
        Parameters:
        after - the filter to apply after this filter is applied
        Returns:
        a composed filter that first applies this function and then applies the after function
      • apply

        default HandlerFunction<R> apply(HandlerFunction<T> handler)
        Apply this filter to the given handler function, resulting in a filtered handler function.
        Parameters:
        handler - the handler function to filter
        Returns:
        the filtered handler function
      • ofRequestProcessor

        static HandlerFilterFunction<?,?> ofRequestProcessor(java.util.function.Function<ServerRequest,reactor.core.publisher.Mono<ServerRequest>> requestProcessor)
        Adapt the given request processor function to a filter function that only operates on the ServerRequest.
        Parameters:
        requestProcessor - the request processor
        Returns:
        the filter adaptation of the request processor
      • ofResponseProcessor

        static <T extends ServerResponse,R extends ServerResponseHandlerFilterFunction<T,R> 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 ServerResponse.
        Parameters:
        responseProcessor - the response processor
        Returns:
        the filter adaptation of the request processor