public class BasicHttpServerExpectationDecorator extends Object implements HttpServerRequestHandler
HttpServerRequestHandler
implementation that adds support
for the Expect-Continue handshake to an existing
HttpServerRequestHandler
.HttpServerRequestHandler.ResponseTrigger
Constructor and Description |
---|
BasicHttpServerExpectationDecorator(HttpServerRequestHandler requestHandler) |
Modifier and Type | Method and Description |
---|---|
void |
handle(ClassicHttpRequest request,
HttpServerRequestHandler.ResponseTrigger responseTrigger,
HttpContext context)
Handles the request and submits a final response to be sent back to the client.
|
protected ClassicHttpResponse |
verify(ClassicHttpRequest request,
HttpContext context)
Verifies the HTTP request and decides whether it meets server expectations and the request
processing can continue.
|
public BasicHttpServerExpectationDecorator(HttpServerRequestHandler requestHandler)
protected ClassicHttpResponse verify(ClassicHttpRequest request, HttpContext context)
request
- the incoming HTTP request.context
- the actual execution context.null
if the request meets expectations or a final HTTP response
with an error status representing the cause of expectation failure.public final void handle(ClassicHttpRequest request, HttpServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context) throws HttpException, IOException
HttpServerRequestHandler
handle
in interface HttpServerRequestHandler
request
- the actual request.responseTrigger
- the response trigger.context
- the actual execution context.HttpException
IOException
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.