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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpRequestMapper
<HttpRequestHandler> private final HttpResponseFactory
<ClassicHttpResponse> -
Constructor Summary
ConstructorsConstructorDescriptionTerminalServerFilter
(HttpRequestMapper<HttpRequestHandler> handlerMapper, HttpResponseFactory<ClassicHttpResponse> responseFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Field Details
-
handlerMapper
-
responseFactory
-
-
Constructor Details
-
TerminalServerFilter
public TerminalServerFilter(HttpRequestMapper<HttpRequestHandler> handlerMapper, HttpResponseFactory<ClassicHttpResponse> responseFactory)
-
-
Method Details
-
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 theHttpFilterChain.proceed(ClassicHttpRequest, HttpFilterChain.ResponseTrigger, HttpContext)
method.- Specified by:
handle
in interfaceHttpFilterHandler
- 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
-