org.apache.hc.core5.http.io.support

## Class BasicHttpServerRequestHandler

- java.lang.Object
- - org.apache.hc.core5.http.io.support.BasicHttpServerRequestHandler

- All Implemented Interfaces:
    HttpServerRequestHandler

      public class BasicHttpServerRequestHandler
      extends Object
      implements HttpServerRequestHandler

  Basic `HttpServerRequestHandler` implementation that makes use of `HttpRequestMapper` to dispatch the request to a particular `HttpRequestHandler` for processing.
  Since:
    5.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.hc.core5.http.io.HttpServerRequestHandler

      `HttpServerRequestHandler.ResponseTrigger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicHttpServerRequestHandler(HttpRequestMapper<HttpRequestHandler> handlerMapper)`
    `BasicHttpServerRequestHandler(HttpRequestMapper<HttpRequestHandler> handlerMapper, HttpResponseFactory<ClassicHttpResponse> responseFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handle(ClassicHttpRequest request, HttpServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context)` Handles the request and submits a final response to be sent back to the client.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicHttpServerRequestHandler

          public BasicHttpServerRequestHandler(HttpRequestMapper<HttpRequestHandler> handlerMapper,
                                               HttpResponseFactory<ClassicHttpResponse> responseFactory)

    - #### BasicHttpServerRequestHandler

          public BasicHttpServerRequestHandler(HttpRequestMapper<HttpRequestHandler> handlerMapper)

  - ### Method Detail

    - #### handle

          public void handle(ClassicHttpRequest request,
                             HttpServerRequestHandler.ResponseTrigger responseTrigger,
                             HttpContext context)
                      throws HttpException,
                             IOException

      Description copied from interface: `HttpServerRequestHandler`
      Handles the request and submits a final response to be sent back to the client.
      Specified by:
        `handle` in interface `HttpServerRequestHandler`
      Parameters:
        `request` - the actual request.
        `responseTrigger` - the response trigger.
        `context` - the actual execution context.
      Throws:
        `HttpException` - in case of an HTTP protocol violation.
        `IOException` - in case of an I/O error.

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.