Class ProxyConfig
java.lang.Object
io.r2dbc.proxy.callback.ProxyConfig
Central configuration object for proxy.
- Author:
- Tadaya Tsuyukubo
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(ProxyExecutionListener listener) RegisterProxyExecutionListener
.static ProxyConfig.Builder
builder()
Create a newProxyConfig.Builder
.getClock()
GetClock
.GetConnectionIdManager
.ReturnsCompositeProxyExecutionListener
that contains registeredProxyExecutionListener
.GetProxyFactory
which is generated from the specifiedProxyFactoryFactory
.GetResultRowConverter
.void
setBindParameterConverter
(BindParameterConverter bindParameterConverter) void
SetClock
to use to calculate the elapsed time.void
setConnectionIdManager
(ConnectionIdManager connectionIdManager) SetConnectionIdManager
.void
setProxyFactoryFactory
(ProxyFactoryFactory proxyFactoryFactory) SetProxyFactoryFactory
.void
setResultRowConverter
(ResultRowConverter resultRowConverter) SetResultRowConverter
.
-
Constructor Details
-
ProxyConfig
public ProxyConfig()
-
-
Method Details
-
builder
-
setProxyFactoryFactory
SetProxyFactoryFactory
. WhenProxyFactoryFactory
is set,ProxyFactoryFactory.create(ProxyConfig)
method is called once to generateProxyFactory
. The generatedProxyFactory
instance is always returned bygetProxyFactory()
unless this method is called to set a newProxyFactoryFactory
.- Parameters:
proxyFactoryFactory
- factory forProxyFactory
- Throws:
IllegalArgumentException
- ifproxyFactoryFactory
isnull
-
getProxyFactory
GetProxyFactory
which is generated from the specifiedProxyFactoryFactory
. Always same instance ofProxyFactory
is returned.- Returns:
- proxy factory
-
getListeners
ReturnsCompositeProxyExecutionListener
that contains registeredProxyExecutionListener
.- Returns:
- composite proxy execution listener
-
addListener
RegisterProxyExecutionListener
.- Parameters:
listener
- a listener to register- Throws:
IllegalArgumentException
- ifproxyFactoryFactory
isnull
-
getConnectionIdManager
GetConnectionIdManager
.- Returns:
- connection id manager
-
setConnectionIdManager
SetConnectionIdManager
.- Parameters:
connectionIdManager
- connection id manager- Throws:
IllegalArgumentException
- ifconnectionIdManager
isnull
-
getClock
-
setClock
SetClock
to use to calculate the elapsed time.- Parameters:
clock
- clock to use- Throws:
IllegalArgumentException
- ifclock
isnull
- See Also:
-
getBindParameterConverter
- Returns:
- bindParameterConverter to use
-
setBindParameterConverter
- Parameters:
bindParameterConverter
- bind parameter converter- Throws:
IllegalArgumentException
- ifbindParameterConverter
isnull
-
getResultRowConverter
GetResultRowConverter
.- Returns:
- resultRowConverter to use
- Since:
- 0.9.0
-
setResultRowConverter
SetResultRowConverter
.- Parameters:
resultRowConverter
- the result row converter- Throws:
IllegalArgumentException
- ifresultRowConverter
isnull
- Since:
- 0.9.0
-