last

handler

Specify a request handler for the route. The router routes requests to handlers depending on whether the various
criteria such as method, path, etc match. There can be only one request handler for a route. If you set this more
than once it will overwrite the previous handler.

blockingHandler

Specify a blocking request handler for the route.
This method works just like handler(Handler) excepted that it will run the blocking handler on a worker thread
so that it won't block the event loop. Note that it's safe to call context.next() from the
blocking handler as it will be executed on the event loop context (and not on the worker thread.
If the blocking handler is ordered it means that any blocking handlers for the same context are never executed
concurrently but always in the order they were called. The default value of ordered is true. If you do not want this
behaviour and don't mind if your blocking handlers are executed in parallel you can set ordered to false.

Parameters:

requestHandler - the blocking request handler

ordered - if true handlers are executed in sequence, otherwise are run in parallel

Returns:

a reference to this, so the API can be used fluently

failureHandler

Specify a failure handler for the route. The router routes failures to failurehandlers depending on whether the various
criteria such as method, path, etc match. There can be only one failure handler for a route. If you set this more
than once it will overwrite the previous handler.