Interface HttpServerTransport.Dispatcher

  • All Known Implementing Classes:
    RestController
    Enclosing interface:
    HttpServerTransport

    public static interface HttpServerTransport.Dispatcher
    Dispatches HTTP requests.
    • Method Detail

      • dispatchRequest

        void dispatchRequest​(RestRequest request,
                             RestChannel channel,
                             ThreadContext threadContext)
        Dispatches the RestRequest to the relevant request handler or responds to the given rest channel directly if the request can't be handled by any request handler.
        Parameters:
        request - the request to dispatch
        channel - the response channel of this request
        threadContext - the thread context
      • dispatchBadRequest

        void dispatchBadRequest​(RestRequest request,
                                RestChannel channel,
                                ThreadContext threadContext,
                                java.lang.Throwable cause)
        Dispatches a bad request. For example, if a request is malformed it will be dispatched via this method with the cause of the bad request.
        Parameters:
        request - the request to dispatch
        channel - the response channel of this request
        threadContext - the thread context
        cause - the cause of the bad request