Package org.apache.http.nio.protocol
Class SimpleNHttpRequestHandler
java.lang.Object
org.apache.http.nio.protocol.SimpleNHttpRequestHandler
- All Implemented Interfaces:
NHttpRequestHandler
@Deprecated
public abstract class SimpleNHttpRequestHandler
extends Object
implements NHttpRequestHandler
Deprecated.
A simple implementation of
NHttpRequestHandler
that abstracts away
the need to use NHttpResponseTrigger
. Implementations need only to
implement handle(HttpRequest, HttpResponse, HttpContext)
.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
handle
(HttpRequest request, HttpResponse response, NHttpResponseTrigger trigger, HttpContext context) Deprecated.Initiates processing of the request.abstract void
handle
(HttpRequest request, HttpResponse response, HttpContext context) Deprecated.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.http.nio.protocol.NHttpRequestHandler
entityRequest
-
Constructor Details
-
SimpleNHttpRequestHandler
public SimpleNHttpRequestHandler()Deprecated.
-
-
Method Details
-
handle
public final void handle(HttpRequest request, HttpResponse response, NHttpResponseTrigger trigger, HttpContext context) throws HttpException, IOException Deprecated.Description copied from interface:NHttpRequestHandler
Initiates processing of the request. This method does not have to submit a response immediately. It can defer transmission of the HTTP response back to the client without blocking the I/O thread by delegating the process of handling the HTTP request to a worker thread. The worker thread in its turn can use the instance ofNHttpResponseTrigger
passed as a parameter to submit a response as at a later point of time once content of the response becomes available.- Specified by:
handle
in interfaceNHttpRequestHandler
- Parameters:
request
- the HTTP request.response
- the HTTP response.trigger
- the response trigger.context
- the HTTP execution context.- Throws:
HttpException
- in case of HTTP protocol violation or a processing problem.IOException
- in case of an I/O error.
-
handle
public abstract void handle(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException Deprecated.- Throws:
HttpException
IOException
-
BasicAsyncRequestHandler