Module io.helidon.servicecommon
Class HelidonFeatureSupport.Builder<B extends HelidonFeatureSupport.Builder<B,T>,T extends HelidonFeatureSupport>
java.lang.Object
io.helidon.webserver.servicecommon.HelidonFeatureSupport.Builder<B,T>
- Type Parameters:
B- type of the concrete builder for the serviceT- type of the concrete service
- Direct Known Subclasses:
MicrometerFeature.Builder,PrometheusSupport.Builder
- Enclosing class:
HelidonFeatureSupport
public abstract static class HelidonFeatureSupport.Builder<B extends HelidonFeatureSupport.Builder<B,T>,T extends HelidonFeatureSupport>
extends Object
implements Builder<B,T>
Abstract implementation of a
Builder for the service.
Concrete implementations may override any of the Builder methods, particularly
config(Config) (to load service-specific values from config into the service-specific Builder).
Such overrides should invoke super.xxx(...) to take advantage of the common behavior implemented here.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the config (if any) assigned for this builder.Deprecated, for removal: This API element is subject to removal in a future version.Sets the configuration to be used by this builder.crossOriginConfig(CrossOriginConfig crossOriginConfig) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featurerestServiceSettings(RestServiceSettings.Builder restServiceSettingsBuilder) Sets the builder for the REST service settings.webContext(String path) Set the root context for the REST API of the service.protected ConfigwebContextConfig(Config config)
-
Constructor Details
-
Builder
-
-
Method Details
-
config
Deprecated, for removal: This API element is subject to removal in a future version.useconfig(io.helidon.config.Config)insteadSets the configuration to be used by this builder.- Parameters:
config- the Helidon config instance- Returns:
- updated builder instance
-
config
Sets the configuration to be used by this builder.Concrete builder implementations may override this method but should invoke
super.config(config)to benefit from the common routing set-up.- Parameters:
config- the Helidon config instance- Returns:
- updated builder instance
-
config
Returns the config (if any) assigned for this builder.- Returns:
- the Config
-
webContext
Set the root context for the REST API of the service.- Parameters:
path- context to use- Returns:
- updated builder instance
-
crossOriginConfig
@Deprecated(forRemoval=true, since="4.4.0") public B crossOriginConfig(CrossOriginConfig crossOriginConfig) Deprecated, for removal: This API element is subject to removal in a future version.feature specific CORS configuration is deprecated and will be removed; use either config based CORS setup (configuration keycors, or programmatic setup using theio.helidon.webserver.cors.CorsFeatureserver featureSet the CORS config from the specifiedCrossOriginConfigobject.- Parameters:
crossOriginConfig-CrossOriginConfigcontaining CORS set-up- Returns:
- updated builder instance
-
restServiceSettings
Sets the builder for the REST service settings.- Parameters:
restServiceSettingsBuilder- builder for REST service settings- Returns:
- updated builder
-
webContextConfig
-
config(io.helidon.config.Config)instead