org.apache.hc.core5.http.nio

## Interface AsyncServerExchangeHandler

- All Superinterfaces:
    AsyncDataConsumer, AsyncDataExchangeHandler, AsyncDataProducer, ResourceHolder
  All Known Implementing Classes:
    AbstractClassicServerExchangeHandler, AbstractServerExchangeHandler, BasicAsyncServerExpectationDecorator, BasicServerExchangeHandler, ImmediateResponseExchangeHandler, ReactiveServerExchangeHandler

      public interface AsyncServerExchangeHandler
      extends AsyncDataExchangeHandler

  Abstract asynchronous server side message exchange handler that acts as a request consumer and a response producer.
  Since:
    5.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleRequest(HttpRequest request, EntityDetails entityDetails, ResponseChannel responseChannel, HttpContext context)` Processes the actual HTTP request.

    - ### Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataExchangeHandler

      `failed`

    - ### Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataConsumer

      `consume, streamEnd, updateCapacity`

    - ### Methods inherited from interface org.apache.hc.core5.http.nio.AsyncDataProducer

      `available, produce`

    - ### Methods inherited from interface org.apache.hc.core5.http.nio.ResourceHolder

      `releaseResources`

- - ### Method Detail

    - #### handleRequest

          void handleRequest(HttpRequest request,
                           EntityDetails entityDetails,
                           ResponseChannel responseChannel,
                           HttpContext context)
                             throws HttpException,
                                    IOException

      Processes the actual HTTP request. The handler can choose to send response messages immediately inside the call or asynchronously at some later point.
      Parameters:
        `request` - the actual request.
        `entityDetails` - the request entity details or `null` if the request does not enclose an entity.
        `responseChannel` - the response channel.
        `context` - the actual execution context.
      Throws:
        `HttpException`
        `IOException`

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