java.lang.Object
io.helidon.common.config.ConfigBuilderSupport
Deprecated, for removal: This API element is subject to removal in a future version.
Methods used from generated code in builders when
Prototype.Configured is used.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated, for removal: This API element is subject to removal in a future version.Extension ofPrototype.Builderthat supports configuration. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends NamedService,T extends ConfiguredProvider<S>>
Optional<S> discoverService(Config config, String configKey, HelidonServiceLoader<T> serviceLoader, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, Optional<S> existingValue) Deprecated, for removal: This API element is subject to removal in a future version.static <S extends NamedService,T extends ConfiguredProvider<S>>
Optional<S> discoverService(Config config, String configKey, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, Optional<S> existingValue) Deprecated, for removal: This API element is subject to removal in a future version.Discover service from configuration.static <T extends NamedService>
Optional<T> discoverService(Config config, String configKey, Optional<ServiceRegistry> serviceRegistry, Class<? extends ConfiguredProvider<T>> providerType, Class<T> configType, boolean discoverServices, Optional<T> existingValue) Deprecated, for removal: This API element is subject to removal in a future version.Used to discover service fromServiceRegistryfor builder options annotated withOption.Provider, if the blueprint is annotated withPrototype.RegistrySupport.static <S extends NamedService,T extends ConfiguredProvider<S>>
List<S> discoverServices(Config config, String configKey, HelidonServiceLoader<T> serviceLoader, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, List<S> existingInstances) Deprecated, for removal: This API element is subject to removal in a future version.static <S extends NamedService,T extends ConfiguredProvider<S>>
List<S> discoverServices(Config config, String configKey, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, List<S> existingInstances) Deprecated, for removal: This API element is subject to removal in a future version.Discover services from configuration.static <T extends NamedService>
List<T> discoverServices(Config config, String configKey, Optional<ServiceRegistry> serviceRegistry, Class<? extends ConfiguredProvider<T>> providerType, Class<T> configType, boolean allFromRegistry, List<T> existingValues) Deprecated, for removal: This API element is subject to removal in a future version.Used to discover services fromServiceRegistryfor builder options annotated withOption.Provider, if the blueprint is annotated withPrototype.RegistrySupport.
-
Method Details
-
discoverServices
public static <T extends NamedService> List<T> discoverServices(Config config, String configKey, Optional<ServiceRegistry> serviceRegistry, Class<? extends ConfiguredProvider<T>> providerType, Class<T> configType, boolean allFromRegistry, List<T> existingValues) Deprecated, for removal: This API element is subject to removal in a future version.Used to discover services fromServiceRegistryfor builder options annotated withOption.Provider, if the blueprint is annotated withPrototype.RegistrySupport.- Type Parameters:
T- type of the service- Parameters:
config- configuration of the optionconfigKey- configuration key associated with this optionserviceRegistry- service registry instanceproviderType- type of the service provider (contract)configType- type of the configurationallFromRegistry- whether to use all services from the registryexistingValues- existing values that was explicitly configured by the user- Returns:
- instances from the user augmented with instances from the registry
-
discoverService
public static <T extends NamedService> Optional<T> discoverService(Config config, String configKey, Optional<ServiceRegistry> serviceRegistry, Class<? extends ConfiguredProvider<T>> providerType, Class<T> configType, boolean discoverServices, Optional<T> existingValue) Deprecated, for removal: This API element is subject to removal in a future version.Used to discover service fromServiceRegistryfor builder options annotated withOption.Provider, if the blueprint is annotated withPrototype.RegistrySupport.- Type Parameters:
T- type of the service- Parameters:
config- configuration of the optionconfigKey- configuration key associated with this optionserviceRegistry- service registry instanceproviderType- type of the service provider (contract)configType- type of the configurationdiscoverServices- whether to discover services from registryexistingValue- existing value that was explicitly configured by the user- Returns:
- an instance, if available in the registry, or if provided by the user (user's value wins)
-
discoverServices
@Deprecated(forRemoval=true, since="4.3.0") public static <S extends NamedService,T extends ConfiguredProvider<S>> List<S> discoverServices(Config config, String configKey, HelidonServiceLoader<T> serviceLoader, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, List<S> existingInstances) Deprecated, for removal: This API element is subject to removal in a future version.Discover services from configuration. If already configured instances already contain a service of the same type and name that would be added from configuration, the configuration would be ignored (e.g. the user must make a choice whether to configure, or set using an API).- Type Parameters:
S- type of the expected serviceT- type of the configured service provider that creates instances of S- Parameters:
config- configuration located at the parent node of the service providersconfigKey- configuration key of the provider list (either a list node, or object, where each child is one service)serviceLoader- helidon service loader for the expected typeproviderType- type of the service provider interfaceconfigType- type of the configured serviceallFromServiceLoader- whether all services from service loader should be used, or only the ones with configured nodeexistingInstances- already configured instances- Returns:
- list of discovered services, ordered by
Weight(highest weight is first in the list)
-
discoverServices
public static <S extends NamedService,T extends ConfiguredProvider<S>> List<S> discoverServices(Config config, String configKey, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, List<S> existingInstances) Deprecated, for removal: This API element is subject to removal in a future version.Discover services from configuration. If already configured instances contain a service of the same type and name that would be added from configuration, the configuration would be ignored (e.g. the user must make a choice whether to configure, or set using an API).- Type Parameters:
S- type of the expected serviceT- type of the configured service provider that creates instances of S- Parameters:
config- configuration located at the parent node of the service providersconfigKey- configuration key of the provider list (either a list node, or object, where each child is one service)providerType- type of the service provider interface, used to lookup fromServiceLoaderconfigType- type of the configured serviceallFromServiceLoader- whether all services from service loader should be used, or only the ones with configured nodeexistingInstances- already configured instances- Returns:
- list of discovered services, ordered by
Weight(highest weight is first in the list)
-
discoverService
@Deprecated(forRemoval=true, since="4.3.0") public static <S extends NamedService,T extends ConfiguredProvider<S>> Optional<S> discoverService(Config config, String configKey, HelidonServiceLoader<T> serviceLoader, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, Optional<S> existingValue) Deprecated, for removal: This API element is subject to removal in a future version.Discover service from configuration. If an instance is already configured using a builder, it will not be discovered from configuration (e.g. the user must make a choice whether to configure, or set using API).- Type Parameters:
S- type of the expected serviceT- type of the configured service provider that creates instances of S- Parameters:
config- configuration located at the parent node of the service providersconfigKey- configuration key of the provider list (either a list node, or object, where each child is one service - this method requires * zero to one configured services)serviceLoader- helidon service loader for the expected typeproviderType- type of the service provider interfaceconfigType- type of the configured serviceallFromServiceLoader- whether all services from service loader should be used, or only the ones with configured nodeexistingValue- value already configured, if the name is same as discovered from configuration- Returns:
- the first service (ordered by
Weightthat is discovered, or empty optional if none is found
-
discoverService
public static <S extends NamedService,T extends ConfiguredProvider<S>> Optional<S> discoverService(Config config, String configKey, Class<T> providerType, Class<S> configType, boolean allFromServiceLoader, Optional<S> existingValue) Deprecated, for removal: This API element is subject to removal in a future version.Discover service from configuration. If an instance is already configured using a builder, it will not be discovered from configuration (e.g. the user must make a choice whether to configure, or set using API).- Type Parameters:
S- type of the expected serviceT- type of the configured service provider that creates instances of S- Parameters:
config- configuration located at the parent node of the service providersconfigKey- configuration key of the provider list (either a list node, or object, where each child is one service - this method requires * zero to one configured services)providerType- type of the service provider interface, used to lookup fromServiceLoaderconfigType- type of the configured serviceallFromServiceLoader- whether all services from service loader should be used, or only the ones with configured nodeexistingValue- value already configured, if the name is same as discovered from configuration- Returns:
- the first service (ordered by
Weightthat is discovered, or empty optional if none is found
-
io.helidon.config.ConfigBuilderSupportinstead