Class InMemoryConnectorCommonConfiguration

java.lang.Object
io.smallrye.reactive.messaging.memory.InMemoryConnectorCommonConfiguration
Direct Known Subclasses:
InMemoryConnectorIncomingConfiguration, InMemoryConnectorOutgoingConfiguration

public class InMemoryConnectorCommonConfiguration extends Object
Extracts the common configuration for the smallrye-in-memory connector.
  • Field Details

    • config

      protected final org.eclipse.microprofile.config.Config config
  • Constructor Details

    • InMemoryConnectorCommonConfiguration

      public InMemoryConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config)
      Creates a new InMemoryConnectorCommonConfiguration.
  • Method Details

    • config

      public org.eclipse.microprofile.config.Config config()
      Returns:
      the connector configuration
    • getFromAlias

      protected <T> Optional<T> getFromAlias(String alias, Class<T> type)
      Retrieves the value stored for the given alias.
      Type Parameters:
      T - the targeted type
      Parameters:
      alias - the attribute alias, must not be null or blank
      type - the targeted type
      Returns:
      the configuration value for the given alias, empty if not set
    • getFromAliasWithDefaultValue

      protected <T> T getFromAliasWithDefaultValue(String alias, Class<T> type, T defaultValue)
      Retrieves the value stored for the given alias. Returns the default value if not present.
      Type Parameters:
      T - the targeted type
      Parameters:
      alias - the attribute alias, must not be null or blank
      type - the targeted type
      defaultValue - the default value
      Returns:
      the configuration value for the given alias, empty if not set
    • getChannel

      public String getChannel()
      Returns:
      the channel name
    • validate

      public void validate()