Interface WebInterceptorManager<A extends ExchangeContext,B extends WebInterceptable<A,B>>
- Type Parameters:
A
- the type of the exchange contextB
- the type of Web interceptable
- All Superinterfaces:
InterceptorManager<A,
WebExchange<A>, B, WebInterceptorManager<A, B>>
A web interceptor manager is used to define interceptors in a web intercepting router.
It is created by a web router and allows to define interceptors in a web intercepting router.
- Since:
- 1.3
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionSpecifies the media range defining the content types accepted by the route to intercept as defined by RFC 7231 Section 5.3.2.Specifies the language range matching the language tag produced by the route to intercept.Specifies the method of the routes that must be intercepted.default WebInterceptorManager
<A, B> Specifies the path without matching trailing slash to the route to intercept.Specifies the path matching or not trailing slash to the route to intercept.Specifies the media range matching the content type produced by the route to intercept.Methods inherited from interface io.inverno.mod.web.server.spi.InterceptorManager
interceptor, interceptors
-
Method Details
-
path
Specifies the path without matching trailing slash to the route to intercept.
The specified path can be specified as a parameterized path and include path pattern like
?
,*
,**
as defined byURIBuilder
. Note that this path is only meant to filter routes and as a result path parameters have no use.- Parameters:
path
- a path- Returns:
- the web interceptor manager
- Throws:
IllegalArgumentException
- if the specified path is not absolute- See Also:
-
path
WebInterceptorManager<A,B> path(String path, boolean matchTrailingSlash) throws IllegalArgumentException Specifies the path matching or not trailing slash to the route to intercept.
The specified path can be specified as a parameterized path and include path pattern like
?
,*
,**
as defined byURIBuilder
. Note that this path is only meant to filter routes and as a result path parameters have no use.- Parameters:
path
- a pathmatchTrailingSlash
- true to match path with or without trailing slash, false otherwise- Returns:
- the web interceptor manager
- Throws:
IllegalArgumentException
- if the specified path is not absolute- See Also:
-
method
Specifies the method of the routes that must be intercepted.
- Parameters:
method
- a HTTP method- Returns:
- the web interceptor manager
-
consumes
Specifies the media range defining the content types accepted by the route to intercept as defined by RFC 7231 Section 5.3.2.
- Parameters:
mediaRange
- a media range- Returns:
- the web interceptor manager
- See Also:
-
produces
Specifies the media range matching the content type produced by the route to intercept.
- Parameters:
mediaRange
- a media range- Returns:
- the web interceptor manager
- See Also:
-
language
Specifies the language range matching the language tag produced by the route to intercept.
- Parameters:
languageRange
- a language range- Returns:
- the web interceptor manager
- See Also:
-