Interface WebServer<A extends ExchangeContext>

Type Parameters:
A - the exchange context type
All Superinterfaces:
BaseWebRouter, ErrorWebRouteInterceptor<A>, ErrorWebRouter<A>, WebRouteInterceptor<A>, WebRouter<A>
All Known Subinterfaces:
WebServer.Intercepted<A>

public interface WebServer<A extends ExchangeContext> extends WebRouter<A>, WebRouteInterceptor<A>, ErrorWebRouter<A>, ErrorWebRouteInterceptor<A>

The Web server intercepts routes exchanges to matching handlers.

It must be initialized using the WebServer.Boot by providing an ExchangeContext factory which creates the context attached to any exchange and used during its processing.

It is the entry point for configuring the Web routes used to route Web exchanges to a matching Web exchange handlers and the error Web routes used to route error Web exchanges to a matching error Web exchange handlers.

Web routes and error Web routes interceptors are defined in trees of WebServer.Intercepted which are created by defining successive route interceptors which returns intercepted Web server containing the successive interceptor definitions. In order to be intercepted, a Web route or an error Web route must be specified on such intercepted Web server. This allows to isolate interceptor and route definitions which is particularly appreciated when defining them in multiple modules.

Since:
1.12
Author:
Jeremy Kuhn
See Also: