Package io.helidon.servicecommon.rest
Class HelidonRestServiceSupport.Builder<T extends HelidonRestServiceSupport,B extends HelidonRestServiceSupport.Builder<T,B>>
- java.lang.Object
-
- io.helidon.servicecommon.rest.HelidonRestServiceSupport.Builder<T,B>
-
- Type Parameters:
T
- type of the concrete serviceB
- type of the concrete builder for the service
- Direct Known Subclasses:
MetricsSupport.Builder
,MicrometerSupport.Builder
- Enclosing class:
- HelidonRestServiceSupport
public abstract static class HelidonRestServiceSupport.Builder<T extends HelidonRestServiceSupport,B extends HelidonRestServiceSupport.Builder<T,B>> extends Object implements Builder<T>
Abstract implementation of aBuilder
for the service.Concrete implementations may override any of the
Builder
methods, particularlyconfig(Config)
(to load service-specific values from config into the service-specificBuilder
). Such overrides should invokesuper.xxx(...)
to take advantage of the common behavior implemented here.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Config
config()
Returns the config (if any) assigned for this builder.B
config(Config config)
Sets the configuration to be used by this builder.B
crossOriginConfig(CrossOriginConfig crossOriginConfig)
Set the CORS config from the specifiedCrossOriginConfig
object.protected B
me()
Returns correctly-typedthis
.B
restServiceSettings(RestServiceSettings.Builder restServiceSettingsBuilder)
Sets the builder for the REST service settings.B
webContext(String path)
Set the root context for the REST API of the service.protected Config
webContextConfig(Config config)
-
-
-
Method Detail
-
config
public B config(Config 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
public Config config()
Returns the config (if any) assigned for this builder.- Returns:
- the Config
-
webContext
public B webContext(String path)
Set the root context for the REST API of the service.- Parameters:
path
- context to use- Returns:
- updated builder instance
-
crossOriginConfig
public B crossOriginConfig(CrossOriginConfig crossOriginConfig)
Set the CORS config from the specifiedCrossOriginConfig
object.- Parameters:
crossOriginConfig
-CrossOriginConfig
containing CORS set-up- Returns:
- updated builder instance
-
restServiceSettings
public B restServiceSettings(RestServiceSettings.Builder restServiceSettingsBuilder)
Sets the builder for the REST service settings.- Parameters:
restServiceSettingsBuilder
- builder for REST service settings- Returns:
- updated builder
-
me
protected B me()
Returns correctly-typedthis
.- Returns:
- typed "this"
-
-