Module io.inverno.mod.http.server
Package io.inverno.mod.http.server
Interface ExchangeHandler<A extends ExchangeContext,B extends Exchange<A>>
- Type Parameters:
A- the type of the exchange contextB- the type of exchange handled by the handler
- All Superinterfaces:
ReactiveExchangeHandler<A,B>
- All Known Implementing Classes:
FormLoginPageHandler,LoginActionHandler,LogoutActionHandler,StaticHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface ExchangeHandler<A extends ExchangeContext,B extends Exchange<A>>
extends ReactiveExchangeHandler<A,B>
An exchange handler is used to handle server exchanges.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
Methods inherited from interface io.inverno.mod.http.server.ReactiveExchangeHandler
intercept
-
Method Details
-
defer
By default, returns a Mono that defers the execution of
handle(io.inverno.mod.http.server.Exchange).- Specified by:
deferin interfaceReactiveExchangeHandler<A extends ExchangeContext,B extends Exchange<A>> - Parameters:
exchange- the exchange to process- Returns:
- an empty mono that completes when the exchange has been processed
- Throws:
HttpException- if an error occurs during the processing of the exchange
-
handle
Processes the specified server exchange.
This method is more convenient than
defer(io.inverno.mod.http.server.Exchange)when the handling logic does not need to be reactive.- Parameters:
exchange- the exchange to process- Throws:
HttpException- if an error occurs during the processing of the exchange
-