Package org.apache.http.nio.protocol
Class BufferingHttpServiceHandler.RequestHandlerAdaptor
java.lang.Object
org.apache.http.nio.protocol.SimpleNHttpRequestHandler
org.apache.http.nio.protocol.BufferingHttpServiceHandler.RequestHandlerAdaptor
- All Implemented Interfaces:
NHttpRequestHandler
- Enclosing class:
BufferingHttpServiceHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentityRequest
(HttpEntityEnclosingRequest request, HttpContext context) Triggered when a request is received with an entity.void
handle
(HttpRequest request, HttpResponse response, HttpContext context) Methods inherited from class org.apache.http.nio.protocol.SimpleNHttpRequestHandler
handle
-
Field Details
-
requestHandler
-
-
Constructor Details
-
RequestHandlerAdaptor
-
-
Method Details
-
entityRequest
public ConsumingNHttpEntity entityRequest(HttpEntityEnclosingRequest request, HttpContext context) throws HttpException, IOException Description copied from interface:NHttpRequestHandler
Triggered when a request is received with an entity. This method should return aConsumingNHttpEntity
that will be used to consume the entity.null
is a valid response value, and will indicate that the entity should be silently ignored.After the entity is fully consumed,
NHttpRequestHandler.handle(HttpRequest, HttpResponse, NHttpResponseTrigger, HttpContext)
is called to notify a full request & entity are ready to be processed.- Parameters:
request
- the entity enclosing request.context
- the execution context.- Returns:
- non-blocking HTTP entity.
- Throws:
HttpException
- in case of HTTP protocol violation or a processing problem.IOException
- in case of an I/O error.
-
handle
public void handle(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException - Specified by:
handle
in classSimpleNHttpRequestHandler
- Throws:
HttpException
IOException
-