Package org.attribyte.sql.pool.contrib
Class PropertiesPasswordSource
java.lang.Object
org.attribyte.sql.pool.contrib.PropertiesPasswordSource
- All Implemented Interfaces:
PasswordSource
A password source that uses
Properties to
resolve passwords.
- [connection name]=[password]
- [username]@[connection string]=[password]
-
Constructor Summary
ConstructorsConstructorDescriptionPropertiesPasswordSource(Properties properties) Creates a properties password source. -
Method Summary
Modifier and TypeMethodDescriptiongetPassword(String connectionName) Gets the password for a named connection.getPassword(String connectionString, String username) Gets the password for a connection string and username.
-
Constructor Details
-
PropertiesPasswordSource
Creates a properties password source.- Parameters:
properties- The properties.
-
-
Method Details
-
getPassword
Description copied from interface:PasswordSourceGets the password for a named connection.- Specified by:
getPasswordin interfacePasswordSource- Parameters:
connectionName- The connection name.- Returns:
- The password or
nullif none.
-
getPassword
Description copied from interface:PasswordSourceGets the password for a connection string and username.- Specified by:
getPasswordin interfacePasswordSource- Parameters:
connectionString- The connection string.username- The username.- Returns:
- The password or
nullif none.
-