Interface HttpCatcherHandler<T extends java.lang.Throwable>

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

    public interface HttpCatcherHandler<T extends java.lang.Throwable>
    A handler meant to process exceptions occurring while handling incoming HTTP requests, or while responding to them.
    • Method Detail

      • handle

        Future<?> handle​(T throwable,
                         HttpServiceRequest request,
                         HttpServiceResponse response)
                  throws java.lang.Exception
        Called with a an exception, an incoming HTTP request and an HTTP response handler.
        throwable - Exception causing this handler to be invoked.
        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 the exception has been handled and that no more catchers are to be invoked with the request.
        Future completed when catching is complete.
        java.lang.Exception - The exception should be passed on to the next matching catcher, if any.