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 java.lang.Object implements HttpFilterHandler
HttpFilterHandlerimplementation represents a terminal handler in a request processing pipeline that makes use ofHttpRequestMapperto dispatch the request to a particularHttpRequestHandler.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private HttpRequestMapper<HttpRequestHandler>handlerMapperprivate HttpResponseFactory<ClassicHttpResponse>responseFactory
-
Constructor Summary
Constructors Constructor Description TerminalServerFilter(HttpRequestMapper<HttpRequestHandler> handlerMapper, HttpResponseFactory<ClassicHttpResponse> responseFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(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 Detail
-
handlerMapper
private final HttpRequestMapper<HttpRequestHandler> handlerMapper
-
responseFactory
private final HttpResponseFactory<ClassicHttpResponse> responseFactory
-
-
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, java.io.IOException
Description copied from interface:HttpFilterHandlerProcesses 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:
handlein 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:
HttpExceptionjava.io.IOException
-
-