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

## Class TerminalServerFilter

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

- All Implemented Interfaces:
    HttpFilterHandler

      @Contract(threading=STATELESS)
      public final class TerminalServerFilter
      extends Object
      implements HttpFilterHandler

  `HttpFilterHandler` implementation represents a terminal handler in a request processing pipeline that makes use of `HttpRequestMapper` to dispatch the request to a particular `HttpRequestHandler`.
  Since:
    5.0

- - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handle(ClassicHttpRequest request, HttpFilterChain.ResponseTrigger responseTrigger, HttpContext context, HttpFilterChain chain)` Processes the incoming HTTP request and if processing has been completed submits a final response to the client.

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

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

- - ### Constructor Detail

    - #### TerminalServerFilter

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

  - ### Method Detail

    - #### handle

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

      Description copied from interface: `HttpFilterHandler`
      Processes the incoming HTTP request and if processing has been completed submits a final response to the client. The handler must not use the response trigger after passing control to the next filter with the `HttpFilterChain.proceed(ClassicHttpRequest, HttpFilterChain.ResponseTrigger, HttpContext)` method.
      Specified by:
        `handle` in interface `HttpFilterHandler`
      Parameters:
        `request` - the actual request.
        `responseTrigger` - the response trigger.
        `context` - the actual execution context.
        `chain` - the next element in the request processing chain.
      Throws:
        `HttpException`
        `IOException`

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