Class SingleConnectionFactoryLookup
java.lang.Object
org.springframework.r2dbc.connection.lookup.SingleConnectionFactoryLookup
- All Implemented Interfaces:
ConnectionFactoryLookup
An implementation of
ConnectionFactoryLookup
that
simply wraps a single given ConnectionFactory
returned for any connection factory name.- Since:
- 5.3
- Author:
- Mark Paluch
-
Constructor Summary
ConstructorDescriptionSingleConnectionFactoryLookup
(ConnectionFactory connectionFactory) Create a new instance of theSingleConnectionFactoryLookup
class. -
Method Summary
Modifier and TypeMethodDescriptiongetConnectionFactory
(String connectionFactoryName) Retrieve theConnectionFactory
identified by the given name.
-
Constructor Details
-
SingleConnectionFactoryLookup
Create a new instance of theSingleConnectionFactoryLookup
class.- Parameters:
connectionFactory
- the singleConnectionFactory
to wrap
-
-
Method Details
-
getConnectionFactory
public ConnectionFactory getConnectionFactory(String connectionFactoryName) throws ConnectionFactoryLookupFailureException Description copied from interface:ConnectionFactoryLookup
Retrieve theConnectionFactory
identified by the given name.- Specified by:
getConnectionFactory
in interfaceConnectionFactoryLookup
- Parameters:
connectionFactoryName
- the name of theConnectionFactory
- Returns:
- the
ConnectionFactory
(nevernull
) - Throws:
ConnectionFactoryLookupFailureException
- if the lookup failed
-