Module io.inverno.mod.http.server
Package io.inverno.mod.http.server
Interface ErrorExchangeHandler<A extends Throwable,B extends ErrorExchange<A>>
- Type Parameters:
A- the error typeB- the error exchange type handled by the handler
- All Superinterfaces:
ReactiveExchangeHandler<ExchangeContext,B>
public interface ErrorExchangeHandler<A extends Throwable,B extends ErrorExchange<A>>
extends ReactiveExchangeHandler<ExchangeContext,B>
Exchange handler used to handle error server exchanges.
The HTTP server relies on an error exchange handler to handle errors thrown during the processing of a client request in order to provide a proper response to the client.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
Methods inherited from interface io.inverno.mod.http.server.ReactiveExchangeHandler
intercept
-
Method Details
-
defer
Returns a Mono that defers the execution of
handle(io.inverno.mod.http.server.ErrorExchange).- Specified by:
deferin interfaceReactiveExchangeHandler<A extends Throwable,B extends ErrorExchange<A>> - Parameters:
exchange- the exchange to process- Returns:
- an empty mono that completes when the exchange has been processed
-
handle
Processes the specified server exchange.
The purpose of this method is to eventually inject a
ResponseBodyin the response which basically completes the exchange- Parameters:
exchange- the exchange to process- Throws:
HttpException- if an error occurs during the processing of the exchange
-