|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
HttpAsyncRequestHandler
@Deprecated public interface NHttpRequestHandler
NHttpRequestHandler represents a routine for asynchronous processing of a specific group of non-blocking HTTP requests. Protocol handlers are designed to take care of protocol specific aspects, whereas individual request handlers are expected to take care of application specific HTTP processing. The main purpose of a request handler is to generate a response object with a content entity to be sent back to the client in response to the given request
Method Summary | |
---|---|
ConsumingNHttpEntity |
entityRequest(HttpEntityEnclosingRequest request,
HttpContext context)
Deprecated. Triggered when a request is received with an entity. |
void |
handle(HttpRequest request,
HttpResponse response,
NHttpResponseTrigger trigger,
HttpContext context)
Deprecated. Initiates processing of the request. |
Method Detail |
---|
ConsumingNHttpEntity entityRequest(HttpEntityEnclosingRequest request, HttpContext context) throws HttpException, IOException
ConsumingNHttpEntity
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,
handle(HttpRequest, HttpResponse, NHttpResponseTrigger, HttpContext)
is called to notify a full request & entity are ready to be processed.
request
- the entity enclosing request.context
- the execution context.
IOException
- in case of an I/O error.
HttpException
- in case of HTTP protocol violation or a processing
problem.void handle(HttpRequest request, HttpResponse response, NHttpResponseTrigger trigger, HttpContext context) throws HttpException, IOException
NHttpResponseTrigger
passed as a parameter to submit a response as at a later point of time
once content of the response becomes available.
request
- the HTTP request.response
- the HTTP response.trigger
- the response trigger.context
- the HTTP execution context.
IOException
- in case of an I/O error.
HttpException
- in case of HTTP protocol violation or a processing
problem.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |