Module io.inverno.mod.web.server
Package io.inverno.mod.web.server
Interface ErrorWebExchange<A extends ExchangeContext>
- Type Parameters:
A- the type of the exchange context
- All Superinterfaces:
BaseExchange<A,,Request, Response> ErrorExchange<A>,Exchange<A>
An error exchange that extends HTTP server ErrorExchange.
It especially provides response body encoding based on the response content type.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault ErrorWebExchange<A> Returns an error exchange consisting of the result of applying the given function to the error of the exchange.request()Returns the request part of the exchange.response()Returns the response part of the exchange.Methods inherited from interface io.inverno.mod.http.base.BaseExchange
context, getCancelCause, getProtocol, reset, resetMethods inherited from interface io.inverno.mod.http.server.ErrorExchange
getError, webSocket
-
Method Details
-
request
WebRequest request()Description copied from interface:BaseExchangeReturns the request part of the exchange.
- Specified by:
requestin interfaceBaseExchange<A extends ExchangeContext,Request, Response> - Returns:
- the request part
-
response
WebResponse response()Description copied from interface:BaseExchangeReturns the response part of the exchange.
- Specified by:
responsein interfaceBaseExchange<A extends ExchangeContext,Request, Response> - Returns:
- the response part
-
mapError
Description copied from interface:ErrorExchangeReturns an error exchange consisting of the result of applying the given function to the error of the exchange.
- Specified by:
mapErrorin interfaceErrorExchange<A extends ExchangeContext>- Parameters:
errorMapper- an error mapper- Returns:
- a new error exchange
-