public interface

NHttpResponseTrigger

org.apache.http.nio.protocol.NHttpResponseTrigger

Class Overview

Callback interface to submit HTTP responses asynchronously.

The handle(org.apache.http.HttpRequest, HttpResponse, NHttpResponseTrigger, org.apache.http.protocol.HttpContext) 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 of NHttpResponseTrigger passed as a parameter to submit a response as at a later point of time once the response becomes available.

Summary

Public Methods
abstract void handleException(IOException ex)
Report an IOException thrown while processing the request.
abstract void handleException(HttpException ex)
Reports a protocol exception thrown while processing the request.
abstract void submitResponse(HttpResponse response)
Submits a response to be sent back to the client as a result of processing of the request.

Public Methods

public abstract void handleException (IOException ex)

Report an IOException thrown while processing the request.

public abstract void handleException (HttpException ex)

Reports a protocol exception thrown while processing the request.

public abstract void submitResponse (HttpResponse response)

Submits a response to be sent back to the client as a result of processing of the request.