Class DirectHandlers

java.lang.Object
io.helidon.webserver.http.DirectHandlers

public class DirectHandlers extends Object
Configured handlers for expected (and internal) exceptions.
  • Method Details

    • builder

      public static DirectHandlers.Builder builder()
      New builder.
      Returns:
      builder
    • create

      public static DirectHandlers create()
      Create a new instance with default handlers.
      Returns:
      a new instance
    • handler

      public DirectHandler handler(DirectHandler.EventType eventType)
      Get handler for the event type. If no custom handler is defined, the default handler will be returned.
      Parameters:
      eventType - event type
      Returns:
      handler to use
    • handle

      public void handle(RequestException httpException, ServerResponse res, boolean keepAlive)
      Handle an HTTP Exception that occurred when request and response is available.
      Parameters:
      httpException - exception to handle
      res - response
      keepAlive - whether to keep the connection alive