Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.router
Interface RoutingLink.ChainBuilder<A,B,C extends Route<A>,D extends RouteExtractor<A,C>>
- Type Parameters:
A
- the resource typeB
- the input typeC
- the route typeD
- the route extractor type
- All Superinterfaces:
Function<Supplier<RoutingLink<A,
B, C, D>>, RoutingLink<A, B, C, D>>
- Enclosing class:
RoutingLink<A,
B, C extends Route<A>, D extends RouteExtractor<A, C>>
- 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 static interface RoutingLink.ChainBuilder<A,B,C extends Route<A>,D extends RouteExtractor<A,C>>
extends Function<Supplier<RoutingLink<A,B,C,D>>,RoutingLink<A,B,C,D>>
A routing chain builder.
Assuming we have defined 3 routing link: ARoutingLink
, BRoutingLink
and CRoutingLink
, a routing chain can be created as follows:
RoutingLink
.link(ARoutingLink::new)
.link(BRoutingLink::new)
.link(ign -> new CRoutingLink())
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptiondefault RoutingLink
<A, B, C, D> Returns the routing chain.default RoutingLink.ChainBuilder
<A, B, C, D> Links the specified next link factory to the chain.
-
Method Details
-
link
Links the specified next link factory to the chain.
- Parameters:
nextLinkFactory
- the next link factory- Returns:
- the resulting routing chain
-
getRoutingChain
Returns the routing chain.
The routing chain is basically the first routing link in the chain.
- Returns:
- the first routing link
-