Top Description Fields Constructors Methods
org.springframework.r2dbc.connection.lookup

public Class SingleConnectionFactoryLookup

extends Object
implements ConnectionFactoryLookup
Class Inheritance
All Implemented Interfaces
org.springframework.r2dbc.connection.lookup.ConnectionFactoryLookup
Imports
io.r2dbc.spi.ConnectionFactory, org.springframework.util.Assert

An implementation of ConnectionFactoryLookup that simply wraps a single given ConnectionFactory returned for any connection factory name.
Author
Mark Paluch
Since
5.3

Field Summary

Modifier and TypeField and Description
private final ConnectionFactory

Constructor Summary

AccessConstructor and Description
public
SingleConnectionFactoryLookup(ConnectionFactory
the single ConnectionFactory to wrap
connectionFactory
)

Create a new instance of the SingleConnectionFactoryLookup class.

Method Summary

Modifier and TypeMethod and Description
public ConnectionFactory
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionFactoryback to summary
private final ConnectionFactory connectionFactory

Constructor Detail

SingleConnectionFactoryLookupback to summary
public SingleConnectionFactoryLookup(ConnectionFactory connectionFactory)

Create a new instance of the SingleConnectionFactoryLookup class.

Parameters
connectionFactory:ConnectionFactory

the single ConnectionFactory to wrap

Method Detail

getConnectionFactoryback to summary
public ConnectionFactory getConnectionFactory(String connectionFactoryName) throws ConnectionFactoryLookupFailureException

Implements org.springframework.r2dbc.connection.lookup.ConnectionFactoryLookup.getConnectionFactory.

Doc from org.springframework.r2dbc.connection.lookup.ConnectionFactoryLookup.getConnectionFactory.

Retrieve the ConnectionFactory identified by the given name.

Parameters
connectionFactoryName:String

the name of the ConnectionFactory

Returns:ConnectionFactory

the ConnectionFactory (never null)

Annotations
@Override
Exceptions
ConnectionFactoryLookupFailureException:
if the lookup failed