Module io.inverno.mod.http.server
Package io.inverno.mod.http.server
Interface ReactiveServerController<A extends ExchangeContext,B extends Exchange<A>,C extends ErrorExchange<A>>
- Type Parameters:
A
- the type of the exchange contextB
- the type of exchange handled by the controllerC
- the type of error exchange handled by the controller
- All Known Subinterfaces:
ServerController<A,
B, C>
public interface ReactiveServerController<A extends ExchangeContext,B extends Exchange<A>,C extends ErrorExchange<A>>
A reactive server controller defines how exchanges and error exchanges must be handled within the HTTP server following reactive principles.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
-
Method Details
-
defer
Returns a Mono that defers the processing of an exchange.
The HTTP server subscribes to the returned Mono and, on completion, subscribes to the exchange response body data publisher to respond to the client.
- Parameters:
exchange
- the exchange to process- Returns:
- an empty mono that completes when the exchange has been processed
- See Also:
-
defer
Returns a Mono that defers the processing of an error exchange.
In case of error, the HTTP server creates an error exchange from the original exchange, subscribes to the returned Mono and on completion, subscribes to the error exchange response body data publisher to respond to the client.
- Parameters:
errorExchange
- the error exchange to process- Returns:
- an empty mono that completes when the error exchange has been processed
- See Also:
-