Interface HandlerFilterFunction<T extends ServerResponse,​R extends ServerResponse>

    • Method Detail

      • filter

        R filter​(ServerRequest request,
                 HandlerFunction<T> next)
          throws Exception
        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
        Throws:
        Exception
      • andThen

        default HandlerFilterFunction<T,​RandThen​(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<Rapply​(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