- All Superinterfaces:
HttpFeature
,ServerLifecycle
,Supplier<HttpFeature>
- All Known Implementing Classes:
HelidonFeatureSupport
,MicrometerFeature
,PrometheusSupport
Adds support for features that require a service to be exposed.
This covers configurability of the context root, CORS support etc.
-
Method Summary
Modifier and TypeMethodDescriptionWeb context of this service as configured (may not contain leading slash).context()
Web context of this service.boolean
enabled()
When a service is not enabled, it can be omitted from registration with server.default Optional
<HttpService> service()
If this feature is represented by a service, return it here, to simplify implementation.default void
setup
(HttpRouting.Builder routing) Configures service endpoint on the provided routing rules.void
setup
(HttpRouting.Builder defaultRouting, HttpRouting.Builder featureRouting) Configures service endpoint on the provided routing rules.Methods inherited from interface io.helidon.webserver.http.HttpFeature
get, socket, socketRequired
Methods inherited from interface io.helidon.webserver.ServerLifecycle
afterStop, beforeStart
-
Method Details
-
setup
Configures service endpoint on the provided routing rules. This method just adds the endpoint path (as defaulted or configured).- Parameters:
defaultRouting
- default routing builderfeatureRouting
- actual rules (if different from default) for the service endpoint
-
setup
Configures service endpoint on the provided routing rules. This method just adds the endpoint path (as defaulted or configured).- Specified by:
setup
in interfaceHttpFeature
- Parameters:
routing
- routing used to register this service
-
service
If this feature is represented by a service, return it here, to simplify implementation. Otherwise you will need to implementsetup(HttpRouting.Builder, HttpRouting.Builder)
.- Returns:
- service if implemented
-
context
String context()Web context of this service.- Returns:
- context path to be registered
-
configuredContext
String configuredContext()Web context of this service as configured (may not contain leading slash).- Returns:
- context path exactly as configured
-
enabled
boolean enabled()When a service is not enabled, it can be omitted from registration with server.- Returns:
true
for enabled services
-