Class JmsConnectorCommonConfiguration
- java.lang.Object
 - 
- io.smallrye.reactive.messaging.jms.JmsConnectorCommonConfiguration
 
 
- 
- Direct Known Subclasses:
 JmsConnectorIncomingConfiguration,JmsConnectorOutgoingConfiguration
public class JmsConnectorCommonConfiguration extends Object
Extracts the common configuration for thesmallrye-jmsconnector. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.microprofile.config.Configconfig 
- 
Constructor Summary
Constructors Constructor Description JmsConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config)Creates a new JmsConnectorCommonConfiguration. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.microprofile.config.Configconfig()StringgetChannel()Optional<String>getClientId()Gets the client-id value from the configuration.Optional<String>getConnectionFactoryName()Gets the connection-factory-name value from the configuration.Optional<String>getDestination()Gets the destination value from the configuration.StringgetDestinationType()Gets the destination-type value from the configuration.protected <T> Optional<T>getFromAlias(String alias, Class<T> type)Retrieves the value stored for the given alias.protected <T> TgetFromAliasWithDefaultValue(String alias, Class<T> type, T defaultValue)Retrieves the value stored for the given alias.Optional<String>getPassword()Gets the password value from the configuration.StringgetSessionMode()Gets the session-mode value from the configuration.Optional<String>getUsername()Gets the username value from the configuration.voidvalidate() 
 - 
 
- 
- 
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 benullor blanktype- 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 benullor blanktype- the targeted typedefaultValue- 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()
 
 - 
 
 -