Class ConfigArgsConfigSource

java.lang.Object
io.smallrye.config.common.AbstractConfigSource
io.smallrye.config.MapBackedConfigValueConfigSource
io.smallrye.config.PropertiesConfigSource
org.keycloak.quarkus.runtime.configuration.ConfigArgsConfigSource
All Implemented Interfaces:
io.smallrye.config.ConfigValueConfigSource, Serializable, org.eclipse.microprofile.config.spi.ConfigSource

public class ConfigArgsConfigSource extends io.smallrye.config.PropertiesConfigSource

A configuration source for mapping configuration arguments to their corresponding properties so that they can be recognized when building and running the server.

Each argument is going to be mapped to its corresponding configuration property by prefixing the key with the MicroProfileConfigProvider.NS_KEYCLOAK namespace.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.smallrye.config.ConfigValueConfigSource

    io.smallrye.config.ConfigValueConfigSource.ConfigValueMapStringView, io.smallrye.config.ConfigValueConfigSource.ConfigValueMapView, io.smallrye.config.ConfigValueConfigSource.ConfigValueProperties
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final Set<String>
     
    static final String
     

    Fields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource

    CONFIG_ORDINAL, DEFAULT_ORDINAL
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<String>
    Reads the previously set system property for the originally command.
    io.smallrye.config.ConfigValue
    getConfigValue(String propertyName)
     
    static void
    parseConfigArgs(List<String> args, BiConsumer<String,String> valueArgConsumer, Consumer<String> unaryConsumer)
     
    static void
    setCliArgs(String... args)
     

    Methods inherited from class io.smallrye.config.PropertiesConfigSource

    urlToConfigValueMap

    Methods inherited from class io.smallrye.config.MapBackedConfigValueConfigSource

    getConfigValueProperties, getPropertyNames

    Methods inherited from class io.smallrye.config.common.AbstractConfigSource

    getName, getOrdinal, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.microprofile.config.spi.ConfigSource

    getName, getOrdinal

    Methods inherited from interface io.smallrye.config.ConfigValueConfigSource

    getProperties, getValue
  • Field Details

  • Constructor Details

    • ConfigArgsConfigSource

      protected ConfigArgsConfigSource()
  • Method Details

    • setCliArgs

      public static void setCliArgs(String... args)
    • getAllCliArgs

      public static List<String> getAllCliArgs()
      Reads the previously set system property for the originally command. Use the System variable, when you trigger other command executions internally, but need a reference to the actually invoked command.
      Returns:
      the invoked command from the CLI, or empty List if not set.
    • getConfigValue

      public io.smallrye.config.ConfigValue getConfigValue(String propertyName)
      Specified by:
      getConfigValue in interface io.smallrye.config.ConfigValueConfigSource
      Overrides:
      getConfigValue in class io.smallrye.config.MapBackedConfigValueConfigSource
    • parseConfigArgs

      public static void parseConfigArgs(List<String> args, BiConsumer<String,String> valueArgConsumer, Consumer<String> unaryConsumer)