Class QuarkusWebSocketConnectorCommonConfiguration
- java.lang.Object
-
- io.quarkus.reactivemessaging.http.runtime.QuarkusWebSocketConnectorCommonConfiguration
-
- Direct Known Subclasses:
QuarkusWebSocketConnectorIncomingConfiguration,QuarkusWebSocketConnectorOutgoingConfiguration
public class QuarkusWebSocketConnectorCommonConfiguration extends Object
Extracts the common configuration for thequarkus-websocketconnector.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.microprofile.config.Configconfig
-
Constructor Summary
Constructors Constructor Description QuarkusWebSocketConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config)Creates a new QuarkusWebSocketConnectorCommonConfiguration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.microprofile.config.Configconfig()StringgetChannel()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.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
-
validate
public void validate()
-
-