- 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 TypeMethodDescriptionvoid
Execute application code before next handler.default Route.Handler
apply
(Route.Handler next) Chain the filter within next handler.default Route.Before
then
(Route.Before next) Chain this filter with next one and produces a new before filter.default Route.Handler
then
(Route.Handler next) Chain this decorator with a handler and produces a new handler.Methods inherited from interface io.jooby.Route.Aware
setRoute
Methods inherited from interface io.jooby.Route.Filter
then
-
Method Details
-
apply
Description copied from interface:Route.Filter
Chain the filter within next handler.- Specified by:
apply
in 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:
then
in interfaceRoute.Filter
- Parameters:
next
- Next handler.- Returns:
- A new handler.
-