FilteredRequestHandler

A request handler that can apply a series of filters before and after a request is ultimately handled by a handler. The filtered request handler prepares a filter chain that looks something like this:

pre-request filters -> handler -> post-request filters

When a request is handled by this handler, it will be passed on to the above filter chain for processing. If the handler throws an exception, the filter chain will be aborted, and the exception will be immediately handled by the server's configured exception handler.

Constructors

this
this(FilterChain filterChain)

Constructs a filtered request handler that simply applies a given filter chain to any incoming requests.

this
this(HttpRequestHandler handler, HttpRequestFilter[] preRequestFilters, HttpRequestFilter[] postRequestFilters)

Constructs a filtered request handler that applies pre-request filters, then handles a request, and then post-request filters.

Inherited Members

From HttpRequestHandler

handle
void handle(HttpRequestContext ctx)

Handles an HTTP request. Note that this method may be called from multiple threads, as requests may be processed in parallel, so you should avoid performing actions which are not thread-safe.