Class ProxyConnectionFactoryProvider
java.lang.Object
io.r2dbc.proxy.ProxyConnectionFactoryProvider
- All Implemented Interfaces:
ConnectionFactoryProvider
An implementation of
ConnectionFactoryProvider
for creating proxy ConnectionFactory
.
This provider takes proxyListener
parameter and its value can be:
- Fully qualified proxy listener class name
- Proxy listener
Class
- Proxy listener instance
-
Collection
of above
- Author:
- Tadaya Tsuyukubo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ConnectionFactoryOptions connectionFactoryOptions) Create a new proxyConnectionFactory
from givenConnectionFactoryOptions
.boolean
supports
(ConnectionFactoryOptions connectionFactoryOptions)
-
Field Details
-
PROXY_DRIVER
-
PROXY_LISTENERS
-
-
Constructor Details
-
ProxyConnectionFactoryProvider
public ProxyConnectionFactoryProvider()
-
-
Method Details
-
create
Create a new proxyConnectionFactory
from givenConnectionFactoryOptions
.- Specified by:
create
in interfaceConnectionFactoryProvider
- Parameters:
connectionFactoryOptions
- a collection ofConnectionFactoryOptions
- Returns:
- the proxy
ConnectionFactory
- Throws:
IllegalArgumentException
- ifconnectionFactoryOptions
isnull
IllegalStateException
- if there is no value forConnectionFactoryOptions.PROTOCOL
IllegalArgumentException
- ifConnectionFactoryOptions.PROTOCOL
has invalid formatIllegalArgumentException
- if delegatingConnectionFactory
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 instance
-
supports
- Specified by:
supports
in interfaceConnectionFactoryProvider
-
getDriver
- Specified by:
getDriver
in interfaceConnectionFactoryProvider
-