Class JmsConnectorCommonConfiguration
java.lang.Object
io.smallrye.reactive.messaging.jms.JmsConnectorCommonConfiguration
- Direct Known Subclasses:
JmsConnectorIncomingConfiguration,JmsConnectorOutgoingConfiguration
Extracts the common configuration for the
smallrye-jms connector.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJmsConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config) Creates a new JmsConnectorCommonConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.microprofile.config.Configconfig()Gets the client-id value from the configuration.Gets the connection-factory-name value from the configuration.Gets the destination value from the configuration.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.Gets the password value from the configuration.Gets the session-mode value from the configuration.Gets the username value from the configuration.voidvalidate()
-
Field Details
-
config
protected final org.eclipse.microprofile.config.Config config
-
-
Constructor Details
-
JmsConnectorCommonConfiguration
public JmsConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config) Creates a new JmsConnectorCommonConfiguration.
-
-
Method Details
-
config
public org.eclipse.microprofile.config.Config config()- Returns:
- the connector configuration
-
getFromAlias
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
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
- Returns:
- the channel name
-
getConnectionFactoryName
Gets the connection-factory-name value from the configuration. Attribute Name: connection-factory-name Description: The name of the JMS connection factory (`jakarta.jms.ConnectionFactory`) to be used. If not set, it uses any exposed JMS connection factory- Returns:
- the connection-factory-name
-
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
Gets the password value from the configuration. Attribute Name: password Description: The password to connect to to the JMS server- Returns:
- the password
-
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
Gets the client-id value from the configuration. Attribute Name: client-id Description: The client id- Returns:
- the client-id
-
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
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()
-