Interface Router<A extends ExchangeContext,B extends Exchange<A>,C extends Router<A,B,C,D,E,F,G,H>,D extends InterceptedRouter<A,B,C,D,E,F,G,H>,E extends RouteManager<A,B,C,E,H>,F extends RouteManager<A,B,D,F,H>,G extends InterceptorManager<A,B,D,G>,H extends InterceptableRoute<A,B>>

Type Parameters:
A - the type of the exchange context
B - the type of exchange handled by the route
C - the router type
D - the intercepted router type
E - the route manager type
F - the intercepted route manager type
G - the interceptor manager type
H - the interceptable route type
All Superinterfaces:
ExchangeHandler<A,Exchange<A>>, Interceptable<A,B,D,G>, ReactiveExchangeHandler<A,Exchange<A>>, Routable<A,B,C,E,H>
All Known Subinterfaces:
WebRouter<A>

public interface Router<A extends ExchangeContext,B extends Exchange<A>,C extends Router<A,B,C,D,E,F,G,H>,D extends InterceptedRouter<A,B,C,D,E,F,G,H>,E extends RouteManager<A,B,C,E,H>,F extends RouteManager<A,B,D,F,H>,G extends InterceptorManager<A,B,D,G>,H extends InterceptableRoute<A,B>> extends Routable<A,B,C,E,H>, Interceptable<A,B,D,G>, ExchangeHandler<A,Exchange<A>>

Base router interface.

A router uses route definitions to determine the exchange handler to invoke in order to process a request.

Routes are defined in the router using a route manager that allows to specify route criteria and eventually the exchange handler to invoke to process a request that matches the criteria.

A router is itself an exchange handler that implements a routing logic to delegate the actual exchange processing to the exchange handler defined in the route matching the original request. A router is typically used as root handler in a HTTP server.

Since:
1.0
Author:
Jeremy Kuhn
See Also: