Top Description Methods
io.r2dbc.spi

public Interface ConnectionFactoryProvider

Imports
java.util.ServiceLoader

A Java Service interface for implementations to examine a collection of ConnectionFactoryOptions and optionally return an implementation of ConnectionFactory.

ConnectionFactoryProvider implementations are typically discovered by ConnectionFactories from the class path using ServiceLoader.

See Also
ConnectionFactoryOptions, ConnectionFactory, ConnectionFactories, ServiceLoader

Method Summary

Modifier and TypeMethod and Description
public ConnectionFactory

Returns:

the ConnectionFactory created from this collection of ConnectionFactoryOptions
create
(ConnectionFactoryOptions
a collection of ConnectionFactoryOptions
connectionFactoryOptions
)

Creates a new ConnectionFactory given a collection of ConnectionFactoryOptions.

public String

Returns:

the driver identifier used by the driver
getDriver
()

Returns the driver identifier used by the driver.

public boolean

Returns:

true if this ConnectionFactoryProvider supports this collection of ConnectionFactoryOptions, false otherwise
supports
(ConnectionFactoryOptions
a collection of ConnectionFactoryOptions
connectionFactoryOptions
)

Whether this ConnectionFactoryProvider supports this collection of ConnectionFactoryOptions.

Method Detail

createback to summary
public ConnectionFactory create(ConnectionFactoryOptions connectionFactoryOptions)

Creates a new ConnectionFactory given a collection of ConnectionFactoryOptions. This method is only called if a previous invocation of supports(ConnectionFactoryOptions) has returned true.

Parameters
connectionFactoryOptions:ConnectionFactoryOptions

a collection of ConnectionFactoryOptions

Returns:ConnectionFactory

the ConnectionFactory created from this collection of ConnectionFactoryOptions

Exceptions
IllegalArgumentException:
if connectionFactoryOptions is null
getDriverback to summary
public String getDriver()

Returns the driver identifier used by the driver. The identifier for drivers would be the value applicable to ConnectionFactoryOptions#DRIVER

Returns:String

the driver identifier used by the driver

supportsback to summary
public boolean supports(ConnectionFactoryOptions connectionFactoryOptions)

Whether this ConnectionFactoryProvider supports this collection of ConnectionFactoryOptions.

Parameters
connectionFactoryOptions:ConnectionFactoryOptions

a collection of ConnectionFactoryOptions

Returns:boolean

true if this ConnectionFactoryProvider supports this collection of ConnectionFactoryOptions, false otherwise

Exceptions
IllegalArgumentException:
if connectionFactoryOptions is null