org.apache.hc.core5.http.nio.support

## Class AsyncServerExpectationFilter

- java.lang.Object
- - org.apache.hc.core5.http.nio.support.AsyncServerExpectationFilter

- All Implemented Interfaces:
    AsyncFilterHandler

      @Contract(threading=STATELESS)
      public class AsyncServerExpectationFilter
      extends Object
      implements AsyncFilterHandler

  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncServerExpectationFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AsyncEntityProducer` | `generateResponseContent(HttpResponse expectationFailed)`
    `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.
    `protected boolean` | `verify(HttpRequest request, HttpContext context)`

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

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

- - ### Constructor Detail

    - #### AsyncServerExpectationFilter

          public AsyncServerExpectationFilter()

  - ### Method Detail

    - #### verify

          protected boolean verify(HttpRequest request,
                       HttpContext context)
                            throws HttpException

      Throws:
        `HttpException`

    - #### generateResponseContent

          protected AsyncEntityProducer generateResponseContent(HttpResponse expectationFailed)
                                                         throws HttpException

      Throws:
        `HttpException`

    - #### handle

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

      Description copied from interface: `AsyncFilterHandler`
      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.
      Specified by:
        `handle` in interface `AsyncFilterHandler`
      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–2020 The Apache Software Foundation. All rights reserved.