Interface HttpFilterHandler

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface HttpFilterHandler
    A route filter, meant to validate or handle incoming HTTP requests matching some set of preconditions.
    • Method Detail

      • handle

        Future<?> handle​(HttpServiceRequest request,
                         HttpServiceResponse response)
                  throws java.lang.Exception
        Called with an incoming HTTP request and a response handler.
        Parameters:
        request - Information about the incoming HTTP request.
        response - An object useful for indicating how the request is to be responded to. If a status code is set by this handler, the provided request is responded to as soon as this handler completes, which implies that no more filters or any route is invoked with the request.
        Returns:
        Future completed when filtering is complete.
        Throws:
        java.lang.Exception - The exception should be passed on to any matching HttpCatcher.