Class AmqpConnectorCommonConfiguration

    • Field Detail

      • config

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

      • AmqpConnectorCommonConfiguration

        public AmqpConnectorCommonConfiguration​(org.eclipse.microprofile.config.Config config)
        Creates a new AmqpConnectorCommonConfiguration.
    • Method Detail

      • 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
      • getUsername

        public Optional<String> getUsername()
        Gets the username value from the configuration. Attribute Name: username Description: The username used to authenticate to the broker MicroProfile Config Alias: amqp-username
        Returns:
        the username
      • getPassword

        public Optional<String> getPassword()
        Gets the password value from the configuration. Attribute Name: password Description: The password used to authenticate to the broker MicroProfile Config Alias: amqp-password
        Returns:
        the password
      • getHost

        public String getHost()
        Gets the host value from the configuration. Attribute Name: host Description: The broker hostname MicroProfile Config Alias: amqp-host Default Value: localhost
        Returns:
        the host
      • getPort

        public Integer getPort()
        Gets the port value from the configuration. Attribute Name: port Description: The broker port MicroProfile Config Alias: amqp-port Default Value: 5672
        Returns:
        the port
      • getUseSsl

        public Boolean getUseSsl()
        Gets the use-ssl value from the configuration. Attribute Name: use-ssl Description: Whether the AMQP connection uses SSL/TLS MicroProfile Config Alias: amqp-use-ssl Default Value: false
        Returns:
        the use-ssl
      • getReconnectAttempts

        public Integer getReconnectAttempts()
        Gets the reconnect-attempts value from the configuration. Attribute Name: reconnect-attempts Description: The number of reconnection attempts MicroProfile Config Alias: amqp-reconnect-attempts Default Value: 100
        Returns:
        the reconnect-attempts
      • getReconnectInterval

        public Integer getReconnectInterval()
        Gets the reconnect-interval value from the configuration. Attribute Name: reconnect-interval Description: The interval in second between two reconnection attempts MicroProfile Config Alias: amqp-reconnect-interval Default Value: 10
        Returns:
        the reconnect-interval
      • getConnectTimeout

        public Integer getConnectTimeout()
        Gets the connect-timeout value from the configuration. Attribute Name: connect-timeout Description: The connection timeout in milliseconds MicroProfile Config Alias: amqp-connect-timeout Default Value: 1000
        Returns:
        the connect-timeout
      • getContainerId

        public Optional<String> getContainerId()
        Gets the containerId value from the configuration. Attribute Name: containerId Description: The AMQP container id
        Returns:
        the containerId
      • getAddress

        public Optional<String> getAddress()
        Gets the address value from the configuration. Attribute Name: address Description: The AMQP address. If not set, the channel name is used
        Returns:
        the address
      • getClientOptionsName

        public Optional<String> getClientOptionsName()
        Gets the client-options-name value from the configuration. Attribute Name: client-options-name Description: The name of the AMQP Client Option bean used to customize the AMQP client configuration MicroProfile Config Alias: amqp-client-options-name
        Returns:
        the client-options-name
      • validate

        public void validate()