Class StaticConnectionStringProvider<T>
java.lang.Object
com.azure.spring.cloud.core.provider.connectionstring.StaticConnectionStringProvider<T>
- Type Parameters:
T
- The service type.
- All Implemented Interfaces:
ConnectionStringProvider
,ServiceConnectionStringProvider<T>
public final class StaticConnectionStringProvider<T>
extends Object
implements ServiceConnectionStringProvider<T>
A static implementation of
ServiceConnectionStringProvider
, with static value of connection string.-
Constructor Summary
ConstructorDescriptionStaticConnectionStringProvider
(T serviceType, String connectionString) Create aStaticConnectionStringProvider
instance ofStaticConnectionStringProvider
type and with provided connection string. -
Method Summary
Modifier and TypeMethodDescriptionGet the connection stringProvide the service type this provider supports.
-
Constructor Details
-
StaticConnectionStringProvider
Create aStaticConnectionStringProvider
instance ofStaticConnectionStringProvider
type and with provided connection string.- Parameters:
serviceType
- The service type.connectionString
- The value of the connection string.
-
-
Method Details
-
getConnectionString
Description copied from interface:ConnectionStringProvider
Get the connection string- Specified by:
getConnectionString
in interfaceConnectionStringProvider
- Returns:
- the connection string
-
getServiceType
Description copied from interface:ServiceConnectionStringProvider
Provide the service type this provider supports.- Specified by:
getServiceType
in interfaceServiceConnectionStringProvider<T>
- Returns:
- The service type.
-