Class ConnectorConfig

java.lang.Object
io.smallrye.reactive.messaging.providers.impl.ConnectorConfig
All Implemented Interfaces:
org.eclipse.microprofile.config.Config
Direct Known Subclasses:
ConcurrencyConnectorConfig, OverrideConnectorConfig

public class ConnectorConfig extends Object implements org.eclipse.microprofile.config.Config
Implementation of config used to configured the different messaging provider / connector.
  • Field Details

    • CHANNEL_ENABLED_PROPERTY

      public static final String CHANNEL_ENABLED_PROPERTY
      Name of the attribute checking if the channel is enabled (default) or disabled. The value must be either `true` or `false`.
      See Also:
    • BROADCAST_PROPERTY

      public static final String BROADCAST_PROPERTY
      Name of the attribute configuring the broadcast on a connector.
      See Also:
    • MERGE_PROPERTY

      public static final String MERGE_PROPERTY
      Name of the attribute configuring the merge on a connector.
      See Also:
    • prefix

      protected final String prefix
    • overall

      protected final org.eclipse.microprofile.config.Config overall
    • name

      protected final String name
    • connector

      protected final String connector
    • channelPrefix

      protected final String channelPrefix
  • Constructor Details

    • ConnectorConfig

      protected ConnectorConfig(String prefix, org.eclipse.microprofile.config.Config overall, String connector, String channel)
    • ConnectorConfig

      protected ConnectorConfig(String prefix, org.eclipse.microprofile.config.Config overall, String channel)
  • Method Details

    • getConnectorAttribute

      public static String getConnectorAttribute(String prefix, org.eclipse.microprofile.config.Config overall, String channel)
    • channelPrefix

      public static String channelPrefix(String prefix, String name)
    • channelKey

      protected String channelKey(String keyName)
    • connectorKey

      protected String connectorKey(String keyName)
    • getValue

      public <T> T getValue(String propertyName, Class<T> propertyType)
      Specified by:
      getValue in interface org.eclipse.microprofile.config.Config
    • getConfigValue

      public org.eclipse.microprofile.config.ConfigValue getConfigValue(String propertyName)
      Specified by:
      getConfigValue in interface org.eclipse.microprofile.config.Config
    • getOptionalValue

      public <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType)
      Specified by:
      getOptionalValue in interface org.eclipse.microprofile.config.Config
    • convert

      protected <T> T convert(String rawValue, Class<T> propertyType)
    • convertOptional

      protected <T> Optional<T> convertOptional(String rawValue, Class<T> propertyType)
    • getPropertyNames

      public Iterable<String> getPropertyNames()
      Gets the lists of config keys for the given connector. Note that the list contains property names from the config and env variables. It includes keys from the connector config and channel config.
      Specified by:
      getPropertyNames in interface org.eclipse.microprofile.config.Config
      Returns:
      the list of keys
    • toAlpha

      protected String toAlpha(String key)
    • nameExists

      protected boolean nameExists(String name)
    • getConfigSources

      public Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources()
      Specified by:
      getConfigSources in interface org.eclipse.microprofile.config.Config
    • getConverter

      public <T> Optional<org.eclipse.microprofile.config.spi.Converter<T>> getConverter(Class<T> forType)
      Specified by:
      getConverter in interface org.eclipse.microprofile.config.Config
    • unwrap

      public <T> T unwrap(Class<T> type)
      Specified by:
      unwrap in interface org.eclipse.microprofile.config.Config