org.apache.hc.core5.http.nio

## Interface AsyncFilterHandler

- All Known Implementing Classes:
    AbstractAsyncServerAuthFilter, AsyncServerExpectationFilter, TerminalAsyncServerFilter

      @Contract(threading=STATELESS)
      public interface AsyncFilterHandler

  AsyncFilterHandler represents a routine for handling all incoming requests in the server side request processing chain.
  Since:
    5.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsyncDataConsumer` | `handle(HttpRequest request, EntityDetails entityDetails, HttpContext context, AsyncFilterChain.ResponseTrigger responseTrigger, AsyncFilterChain chain)` Processes the incoming HTTP request and if processing has been completed submits a final response to the client.

- - ### Method Detail

    - #### handle

          AsyncDataConsumer handle(HttpRequest request,
                                   EntityDetails entityDetails,
                                   HttpContext context,
                                   AsyncFilterChain.ResponseTrigger responseTrigger,
                                   AsyncFilterChain chain)
                            throws HttpException,
                                   IOException

      Processes the incoming HTTP request and if processing has been completed submits a final response to the client. The handler can choose to send response messages immediately inside the call or asynchronously at some later point. The handler must not use the response trigger after passing control to the next filter with the `AsyncFilterChain.proceed(HttpRequest, EntityDetails, HttpContext, AsyncFilterChain.ResponseTrigger)` method.
      Parameters:
        `request` - the actual request head.
        `entityDetails` - the request entity details or `null` if the request does not enclose an entity.
        `context` - the actual execution context.
        `responseTrigger` - the response trigger.
        `chain` - the next element in the request processing chain.
      Returns:
        the data consumer to be used to process incoming request data. It is expected to be `null` if entityDetails parameter is `null`.
      Throws:
        `HttpException`
        `IOException`

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