Interface ErrorWebInterceptorManager<A extends ExchangeContext,B extends ErrorWebInterceptable<A,B>>
- Type Parameters:
A
- the type of the exchange contextB
- the type of Error Web interceptable
- All Superinterfaces:
ErrorInterceptorManager<A,
,ErrorWebExchange<A>, B, ErrorWebInterceptorManager<A, B>> InterceptorManager<A,
ErrorWebExchange<A>, B, ErrorWebInterceptorManager<A, B>>
An error web interceptor manager is used to define interceptors in an error web router.
It is created by an error web router and allows to define interceptors in an error web intercepted router.
- Since:
- 1.5
- 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.interceptor
(ExchangeInterceptor<? super A, ErrorWebExchange<A>> interceptor) Specifies an error web exchange interceptor to apply to the resources matching the criteria defined in the web interceptor manager.interceptors
(List<ExchangeInterceptor<? super A, ErrorWebExchange<A>>> interceptors) Specifies multiple error web exchange interceptors to apply to the resources matching the criteria defined in the web interceptor manager.Specifies the language range matching the language tag produced by the route to intercept.default ErrorWebInterceptorManager
<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.ErrorInterceptorManager
error
-
Method Details
-
interceptor
Specifies an error web exchange interceptor to apply to the resources matching the criteria defined in the web interceptor manager.
This method basically appends the interceptor and the associated route criteria to the web intercepted router it comes from.
- Specified by:
interceptor
in interfaceInterceptorManager<A extends ExchangeContext,
ErrorWebExchange<A extends ExchangeContext>, B extends ErrorWebInterceptable<A, B>, ErrorWebInterceptorManager<A extends ExchangeContext, B extends ErrorWebInterceptable<A, B>>> - Parameters:
interceptor
- the error web exchange interceptor- Returns:
- the error router
-
interceptors
Specifies multiple error web exchange interceptors to apply to the resources matching the criteria defined in the web interceptor manager.
This method basically appends the interceptors and the associated route criteria to the web intercepted router it comes from.
- Specified by:
interceptors
in interfaceInterceptorManager<A extends ExchangeContext,
ErrorWebExchange<A extends ExchangeContext>, B extends ErrorWebInterceptable<A, B>, ErrorWebInterceptorManager<A extends ExchangeContext, B extends ErrorWebInterceptable<A, B>>> - Parameters:
interceptors
- a list of error web exchange interceptors- Returns:
- the error router
-
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 error web interceptor manager
- Throws:
IllegalArgumentException
- if the specified path is not absolute- See Also:
-
path
ErrorWebInterceptorManager<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 error web interceptor manager
- Throws:
IllegalArgumentException
- if the specified path is not absolute- See Also:
-
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 error 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 error web interceptor manager
- See Also:
-