Module io.helidon.webserver
Package io.helidon.webserver.spi
Interface ServerFeature.RoutingBuilders
- Enclosing interface:
ServerFeature
public static interface ServerFeature.RoutingBuilders
Access to builders of various routing types.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasRouting(Class<?> builderType) Check whether a specific routing builder is available.<T extends Builder<T,?>>
TroutingBuilder(Class<T> builderType) Obtain the routing builder for the provided type.default <T extends Builder<T,?>>
TroutingBuilder(Class<T> builderType, Supplier<T> builderSupplier) Get the routing builder for the provided type, or create a new builder.
-
Method Details
-
hasRouting
Check whether a specific routing builder is available.- Parameters:
builderType- type of the routing builder- Returns:
trueif such a routing exists
-
routingBuilder
Obtain the routing builder for the provided type.- Type Parameters:
T- type that is expected- Parameters:
builderType- type of the routing builder- Returns:
- instance of the routing builder
- Throws:
NoSuchElementException- in case the routing is not avialable- See Also:
-
routingBuilder
default <T extends Builder<T,?>> T routingBuilder(Class<T> builderType, Supplier<T> builderSupplier) Get the routing builder for the provided type, or create a new builder.Default implementation of this method always returns a builder, though if created using
builderSupplierit is ignored by the server.- Type Parameters:
T- type that is expected- Parameters:
builderType- type of the routing builderbuilderSupplier- supplier of a new builder instance- Returns:
- instance of the routing builder
-