Class BasicHttpServerExpectationDecorator
java.lang.Object
org.apache.hc.core5.http.io.support.BasicHttpServerExpectationDecorator
- All Implemented Interfaces:
HttpServerRequestHandler
HttpServerRequestHandler
implementation that adds support
for the Expect-Continue handshake to an existing
HttpServerRequestHandler
.- Since:
- 5.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hc.core5.http.io.HttpServerRequestHandler
HttpServerRequestHandler.ResponseTrigger
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBasicHttpServerExpectationDecorator
(HttpServerRequestHandler requestHandler) -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.
-
Field Details
-
requestHandler
-
-
Constructor Details
-
BasicHttpServerExpectationDecorator
-
-
Method Details
-
verify
Verifies the HTTP request and decides whether it meets server expectations and the request processing can continue.- Parameters:
request
- the incoming HTTP request.context
- the actual execution context.- Returns:
null
if the request meets expectations or a final HTTP response with an error status representing the cause of expectation failure.
-
handle
public final void handle(ClassicHttpRequest request, HttpServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context) throws HttpException, IOException Description copied from interface:HttpServerRequestHandler
Handles the request and submits a final response to be sent back to the client.- Specified by:
handle
in interfaceHttpServerRequestHandler
- Parameters:
request
- the actual request.responseTrigger
- the response trigger.context
- the actual execution context.- Throws:
HttpException
IOException
-