Interface HttpExceptionHandler

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 HttpExceptionHandler
A lambda "catch-all" for handling exceptions during HTTP-Request processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onHttpError(RestRequestEvent aRequestEvent, org.refcodes.web.HttpServerResponse aHttpServerResponse, Exception aException, org.refcodes.web.HttpStatusCode aHttpStatusCode)
    Invoked upon thrown Exception instances whilst processing HTTP-Requests.
  • Method Details

    • onHttpError

      void onHttpError(RestRequestEvent aRequestEvent, org.refcodes.web.HttpServerResponse aHttpServerResponse, Exception aException, org.refcodes.web.HttpStatusCode aHttpStatusCode)
      Invoked upon thrown Exception instances whilst processing HTTP-Requests. Process the HTTP-Response as of what you get from the HTTP-Request
      Parameters:
      aRequestEvent - The HTTP-Request related to the Exception.
      aHttpServerResponse - The HTTP-Response to be worked with.
      aException - The Exception involved in the problem.
      aHttpStatusCode - The HTTP-Error-Code (if known) identified.