Class RestClientFallbackConfigSourceInterceptor

java.lang.Object
io.smallrye.config.AbstractMappingConfigSourceInterceptor
io.smallrye.config.FallbackConfigSourceInterceptor
io.quarkus.restclient.config.RestClientFallbackConfigSourceInterceptor
All Implemented Interfaces:
io.smallrye.config.ConfigSourceInterceptor, Serializable

public class RestClientFallbackConfigSourceInterceptor extends io.smallrye.config.FallbackConfigSourceInterceptor
See Also:
  • Constructor Details

    • RestClientFallbackConfigSourceInterceptor

      public RestClientFallbackConfigSourceInterceptor()
  • Method Details

    • iterateNames

      public Iterator<String> iterateNames(io.smallrye.config.ConfigSourceInterceptorContext context)
      If an MP-style property is detected (e.g. "prefix/mp-rest/url"), we need to include the relevant Quarkus-style property name ("quarkus.rest-client.prefix.url") in the iteration. This is required so that the BuildTimeConfigurationReader is aware that it should create the configuration objects for REST clients (RestClientConfig).
      Specified by:
      iterateNames in interface io.smallrye.config.ConfigSourceInterceptor
      Overrides:
      iterateNames in class io.smallrye.config.AbstractMappingConfigSourceInterceptor
    • extractQuarkusClientPrefixAndProperty

      static String[] extractQuarkusClientPrefixAndProperty(String key)
      Splits a property key into client prefix and property name. If given key doesn't contain a client prefix, null will be returned in the first array item. Examples:
    • `client-prefix.url` will return `String[] {"client-prefix", "url"}`
    • `"client.prefix".url` will return `String[] {"client.prefix", "url"}`
    • `"disable-smart-produces` will return `String[] {null, "disable-smart-produces"}`
    • Parameters:
      key - property key
      Returns:
      two-item array containing the client prefix and the property name
    • extractMPClientPrefixAndProperty

      static String[] extractMPClientPrefixAndProperty(String key)