@Contract(threading=STATELESS) public class HttpServerExpectationFilter extends Object implements HttpFilterHandler
| Constructor and Description |
|---|
HttpServerExpectationFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected HttpEntity |
generateResponseContent(HttpResponse expectationFailed)
Generates response content entity for the final HTTP response with an error status
representing the cause of expectation failure.
|
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.
|
protected boolean |
verify(ClassicHttpRequest request,
HttpContext context)
Verifies the HTTP request and decides whether it meets server expectations and the request
processing can continue.
|
protected boolean verify(ClassicHttpRequest request, HttpContext context) throws HttpException
request - the incoming HTTP request.context - the actual execution context.true if the request meets expectations or false otherwise.HttpExceptionprotected HttpEntity generateResponseContent(HttpResponse expectationFailed) throws HttpException
expectationFailed - the final HTTP response.HttpExceptionpublic final void handle(ClassicHttpRequest request, HttpFilterChain.ResponseTrigger responseTrigger, HttpContext context, HttpFilterChain chain) throws HttpException, IOException
HttpFilterHandlerHttpFilterChain.proceed(ClassicHttpRequest, HttpFilterChain.ResponseTrigger, HttpContext)
method.handle in interface HttpFilterHandlerrequest - the actual request.responseTrigger - the response trigger.context - the actual execution context.chain - the next element in the request processing chain.HttpExceptionIOExceptionCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.