Class JmsConnectorCommonConfiguration

    • Field Detail

      • config

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

      • JmsConnectorCommonConfiguration

        public JmsConnectorCommonConfiguration​(org.eclipse.microprofile.config.Config config)
        Creates a new JmsConnectorCommonConfiguration.
    • 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
      • getConnectionFactoryName

        public Optional<String> getConnectionFactoryName()
        Gets the connection-factory-name value from the configuration. Attribute Name: connection-factory-name Description: The name of the JMS connection factory (`javax.jms.ConnectionFactory`) to be used. If not set, it uses any exposed JMS connection factory
        Returns:
        the connection-factory-name
      • getUsername

        public Optional<String> getUsername()
        Gets the username value from the configuration. Attribute Name: username Description: The username to connect to to the JMS server
        Returns:
        the username
      • getPassword

        public Optional<String> getPassword()
        Gets the password value from the configuration. Attribute Name: password Description: The password to connect to to the JMS server
        Returns:
        the password
      • getSessionMode

        public String getSessionMode()
        Gets the session-mode value from the configuration. Attribute Name: session-mode Description: The session mode. Accepted values are AUTO_ACKNOWLEDGE, SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE Default Value: AUTO_ACKNOWLEDGE
        Returns:
        the session-mode
      • getClientId

        public Optional<String> getClientId()
        Gets the client-id value from the configuration. Attribute Name: client-id Description: The client id
        Returns:
        the client-id
      • getDestination

        public Optional<String> getDestination()
        Gets the destination value from the configuration. Attribute Name: destination Description: The name of the JMS destination. If not set the name of the channel is used
        Returns:
        the destination
      • getDestinationType

        public String getDestinationType()
        Gets the destination-type value from the configuration. Attribute Name: destination-type Description: The type of destination. It can be either `queue` or `topic` Default Value: queue
        Returns:
        the destination-type
      • validate

        public void validate()