- All Superinterfaces:
Route.Aware,Route.Filter
- All Known Implementing Classes:
CsrfHandler,RateLimitHandler,SSLHandler
- Enclosing class:
- Route
Decorates a handler and run logic before handler is executed.
- Since:
- 2.0.0
- Author:
- edgar
-
Method Summary
Modifier and TypeMethodDescriptionvoidExecute application code before next handler.default Route.Handlerapply(Route.Handler next) Chain the filter within next handler.default Route.Beforethen(Route.Before next) Chain this filter with next one and produces a new before filter.default Route.Handlerthen(Route.Handler next) Chain this decorator with a handler and produces a new handler.Methods inherited from interface io.jooby.Route.Aware
setRouteMethods inherited from interface io.jooby.Route.Filter
then
-
Method Details
-
apply
Description copied from interface:Route.FilterChain the filter within next handler.- Specified by:
applyin interfaceRoute.Filter- Parameters:
next- Next handler.- Returns:
- A new handler.
-
apply
Execute application code before next handler.- Parameters:
ctx- Web context.- Throws:
Exception- If something goes wrong.
-
then
Chain this filter with next one and produces a new before filter.- Parameters:
next- Next decorator.- Returns:
- A new decorator.
-
then
Chain this decorator with a handler and produces a new handler.- Specified by:
thenin interfaceRoute.Filter- Parameters:
next- Next handler.- Returns:
- A new handler.
-