public class ProxyConnectionFactoryProvider extends Object implements io.r2dbc.spi.ConnectionFactoryProvider
ConnectionFactoryProvider
for creating proxy ConnectionFactory
.
This provider takes proxyListener
parameter and its value can be:
Class
Collection
of above
Modifier and Type | Field and Description |
---|---|
static String |
PROXY_DRIVER
Driver option value.
|
static io.r2dbc.spi.Option<Object> |
PROXY_LISTENERS
Proxy listener
Option . |
Constructor and Description |
---|
ProxyConnectionFactoryProvider() |
Modifier and Type | Method and Description |
---|---|
io.r2dbc.spi.ConnectionFactory |
create(io.r2dbc.spi.ConnectionFactoryOptions connectionFactoryOptions)
Create a new proxy
ConnectionFactory from given ConnectionFactoryOptions . |
String |
getDriver() |
boolean |
supports(io.r2dbc.spi.ConnectionFactoryOptions connectionFactoryOptions) |
public static final String PROXY_DRIVER
public static final io.r2dbc.spi.Option<Object> PROXY_LISTENERS
Option
.public io.r2dbc.spi.ConnectionFactory create(io.r2dbc.spi.ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory
from given ConnectionFactoryOptions
.create
in interface io.r2dbc.spi.ConnectionFactoryProvider
connectionFactoryOptions
- a collection of ConnectionFactoryOptions
ConnectionFactory
IllegalArgumentException
- if connectionFactoryOptions
is null
IllegalStateException
- if there is no value for ConnectionFactoryOptions.PROTOCOL
IllegalArgumentException
- if ConnectionFactoryOptions.PROTOCOL
has invalid formatIllegalArgumentException
- if delegating ConnectionFactory
cannot be foundIllegalArgumentException
- if specified proxyListener parameter class cannot be found or instantiatedIllegalArgumentException
- if specified proxyListener parameter value is not a proxy listener class or instancepublic boolean supports(io.r2dbc.spi.ConnectionFactoryOptions connectionFactoryOptions)
supports
in interface io.r2dbc.spi.ConnectionFactoryProvider
public String getDriver()
getDriver
in interface io.r2dbc.spi.ConnectionFactoryProvider
Copyright © 2024. All rights reserved.