Class AbstractRestClientConfigBuilder
- All Implemented Interfaces:
ConfigBuilder
Usually, named configuration is mapped using a Map because the names are dynamic and unknown to
Quarkus. In the case of the REST Client, configuration names are fixed and known at build time, but not to the point
where the names can be mapped statically, so they still need to be mapped in a Map.
To populate a Map, because the names are dynamic, the Config system has to rely on the list of
property names provided by each source. This also applies to the REST Client, but since the names are known to
Quarkus, the REST Client configuration could be loaded even for sources that don't provide a list of property
names. To achieve such behaviour, we provide a dummy configuration under each REST Client name to force
the Config system to look up the remaining configuration in the same tree.
The concrete implementation is bytecode generated in
io.quarkus.restclient.config.deployment.RestClientConfigUtils#generateRestClientConfigBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.config.SmallRyeConfigBuilderconfigBuilder(io.smallrye.config.SmallRyeConfigBuilder builder) configMappingNames(Class<T> implementationClass) Deprecated, for removal: This API element is subject to removal in a future version.Builds a list of base names fromRestClientsConfigto ignore when rewriting the REST Client configuration.abstract List<RegisteredRestClient>(package private) static intindexOfRestClient(String name) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.runtime.configuration.ConfigBuilder
priority
-
Constructor Details
-
AbstractRestClientConfigBuilder
public AbstractRestClientConfigBuilder()
-
-
Method Details
-
configBuilder
public io.smallrye.config.SmallRyeConfigBuilder configBuilder(io.smallrye.config.SmallRyeConfigBuilder builder) - Specified by:
configBuilderin interfaceConfigBuilder
-
getRestClients
-
getIgnoreNames
Builds a list of base names fromRestClientsConfigto ignore when rewriting the REST Client configuration. Only configuration fromRestClientsConfig.clients()requires rewriting, but they share the same path of the base names due toWithParentNamein the member.- Returns:
- a Set with the names to ignore.
-
configMappingNames
@Deprecated(forRemoval=true) static <T> Map<String,Map<String, configMappingNamesSet<String>>> (Class<T> implementationClass) Deprecated, for removal: This API element is subject to removal in a future version.TODO - Generate this in RestClientConfigUtils - The list can be collected during build time and generated -
indexOfRestClient
-