Class CamelConnectorCommonConfiguration
java.lang.Object
io.smallrye.reactive.messaging.camel.CamelConnectorCommonConfiguration
- Direct Known Subclasses:
CamelConnectorIncomingConfiguration
,CamelConnectorOutgoingConfiguration
Extracts the common configuration for the
smallrye-camel
connector.-
Field Summary
-
Constructor Summary
ConstructorDescriptionCamelConnectorCommonConfiguration
(org.eclipse.microprofile.config.Config config) Creates a new CamelConnectorCommonConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.microprofile.config.Config
config()
Gets the endpoint-uri value from the configuration.protected <T> Optional<T>
getFromAlias
(String alias, Class<T> type) Retrieves the value stored for the given alias.protected <T> T
getFromAliasWithDefaultValue
(String alias, Class<T> type, T defaultValue) Retrieves the value stored for the given alias.void
validate()
-
Field Details
-
config
protected final org.eclipse.microprofile.config.Config config
-
-
Constructor Details
-
CamelConnectorCommonConfiguration
public CamelConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config) Creates a new CamelConnectorCommonConfiguration.
-
-
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 benull
or 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 benull
or blanktype
- the targeted typedefaultValue
- the default value- Returns:
- the configuration value for the given alias, empty if not set
-
getChannel
- Returns:
- the channel name
-
getEndpointUri
Gets the endpoint-uri value from the configuration. Attribute Name: endpoint-uri Description: The URI of the Camel endpoint (read from or written to) Mandatory: yes- Returns:
- the endpoint-uri
-
validate
public void validate()
-