Module io.helidon.webserver
Package io.helidon.webserver.spi
Interface ServerFeatureProvider<T extends ServerFeature>
- Type Parameters:
T
- type of the server feature the provider provides
- All Superinterfaces:
ConfiguredProvider<T>
- All Known Implementing Classes:
AccessLogFeatureProvider
,ContextFeatureProvider
,CorsFeatureProvider
,LimitsFeatureProvider
,ObserveFeatureProvider
,OpenApiFeatureProvider
,SecurityFeatureProvider
Server features provider is a
ServiceLoader
provider API to discover server wide features.
When creating a custom feature, one of the aspects important for how it is configured with the server, and with routing,
is the Weight
.
There are three places where weight is taken into account:
- When discovering server features from the service loader, the weight of this provider implementation is used
- When setting up server features within the server (and as a default for
HttpFeature
added by a server feature), theWeight
orWeighted
of theServerFeature
implementation is used to order the features - When configuring
HttpFeature
from a server feature, the weight of that implementation can override the default from the server feature, and the weight is used to order all HTTP features, including user routing (which has the default weight of 100.0)
- Context: 1100
- Access Log: 1000
- Tracing: 900
- CORS: 950
- Security: 800
- User routing (all handlers): 100
- OpenAPI: 90
- Observe (metrics, health, etc.): 80
weight
.-
Method Summary
Methods inherited from interface io.helidon.common.config.ConfiguredProvider
configKey, create