Interface ErrorWebRoute<A extends ExchangeContext>
- Type Parameters:
A
- the type of the exchange context
- All Superinterfaces:
AcceptAware
,ContentAware
,ErrorAware
,InterceptableRoute<A,
,ErrorWebExchange<A>> PathAware
,Route<A,
ErrorWebExchange<A>>
An error web route specifies criteria used to determine the error web exchange handler to execute to handle a failing request.
It basically supports the following criteria:
- the type of the error thrown during the regular processing of a request
- the path to the resource which can be parameterized as defined by
URIBuilder
. - the content type of the resource
- the language tag of the resource
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the media range defining the content types accepted by the resource served by the route as defined by RFC 7231 Section 5.3.2.getError()
Returns the type of errors supported by the resource served by the route.Returns the language of the resource served by the route.getPath()
Returns the static normalized absolute path to the resource served by the route.Returns the URI pattern that matches all the paths to the resource served by the route.Returns the media type of the resource served by the route.Methods inherited from interface io.inverno.mod.web.server.spi.InterceptableRoute
getInterceptors, setInterceptors
Methods inherited from interface io.inverno.mod.web.server.spi.Route
disable, enable, getHandler, isDisabled, remove
-
Method Details
-
getError
Returns the type of errors supported by the resource served by the route.
- Specified by:
getError
in interfaceErrorAware
- Returns:
- an error type or null to match any error
-
getPath
String getPath()Returns the static normalized absolute path to the resource served by the route.
This criteria should exactly match the absolute path of the request.
-
getPathPattern
URIPattern getPathPattern()Returns the URI pattern that matches all the paths to the resource served by the route.
This criteria should match the absolute path of the request.
- Specified by:
getPathPattern
in interfacePathAware
- Returns:
- a URI pattern or null
-
getConsume
String getConsume()Returns the media range defining the content types accepted by the resource served by the route as defined by RFC 7231 Section 5.3.2.
This criteria should match the request
content-type
header field.- Specified by:
getConsume
in interfaceContentAware
- Returns:
- a media range or null
-
getProduce
String getProduce()Returns the media type of the resource served by the route.
This criteria should match the request
accept
header field.- Specified by:
getProduce
in interfaceAcceptAware
- Returns:
- a media type or null
-
getLanguage
String getLanguage()Returns the language of the resource served by the route.
This criteria should match the request
accept-language
header field.- Specified by:
getLanguage
in interfaceAcceptAware
- Returns:
- a language tag or null
-