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 TypeMethodDescriptionvoidaddListener(ProxyExecutionListener listener) RegisterProxyExecutionListener.static ProxyConfig.Builderbuilder()Create a newProxyConfig.Builder.getClock()GetClock.GetConnectionIdManager.ReturnsCompositeProxyExecutionListenerthat contains registeredProxyExecutionListener.GetProxyFactorywhich is generated from the specifiedProxyFactoryFactory.GetResultRowConverter.voidsetBindParameterConverter(BindParameterConverter bindParameterConverter) voidSetClockto use to calculate the elapsed time.voidsetConnectionIdManager(ConnectionIdManager connectionIdManager) SetConnectionIdManager.voidsetProxyFactoryFactory(ProxyFactoryFactory proxyFactoryFactory) SetProxyFactoryFactory.voidsetResultRowConverter(ResultRowConverter resultRowConverter) SetResultRowConverter.
-
Constructor Details
-
ProxyConfig
public ProxyConfig()
-
-
Method Details
-
builder
-
setProxyFactoryFactory
SetProxyFactoryFactory. WhenProxyFactoryFactoryis set,ProxyFactoryFactory.create(ProxyConfig)method is called once to generateProxyFactory. The generatedProxyFactoryinstance is always returned bygetProxyFactory()unless this method is called to set a newProxyFactoryFactory.- Parameters:
proxyFactoryFactory- factory forProxyFactory- Throws:
IllegalArgumentException- ifproxyFactoryFactoryisnull
-
getProxyFactory
GetProxyFactorywhich is generated from the specifiedProxyFactoryFactory. Always same instance ofProxyFactoryis returned.- Returns:
- proxy factory
-
getListeners
ReturnsCompositeProxyExecutionListenerthat contains registeredProxyExecutionListener.- Returns:
- composite proxy execution listener
-
addListener
RegisterProxyExecutionListener.- Parameters:
listener- a listener to register- Throws:
IllegalArgumentException- ifproxyFactoryFactoryisnull
-
getConnectionIdManager
GetConnectionIdManager.- Returns:
- connection id manager
-
setConnectionIdManager
SetConnectionIdManager.- Parameters:
connectionIdManager- connection id manager- Throws:
IllegalArgumentException- ifconnectionIdManagerisnull
-
getClock
-
setClock
SetClockto use to calculate the elapsed time.- Parameters:
clock- clock to use- Throws:
IllegalArgumentException- ifclockisnull- See Also:
-
getBindParameterConverter
- Returns:
- bindParameterConverter to use
-
setBindParameterConverter
- Parameters:
bindParameterConverter- bind parameter converter- Throws:
IllegalArgumentException- ifbindParameterConverterisnull
-
getResultRowConverter
GetResultRowConverter.- Returns:
- resultRowConverter to use
- Since:
- 0.9.0
-
setResultRowConverter
SetResultRowConverter.- Parameters:
resultRowConverter- the result row converter- Throws:
IllegalArgumentException- ifresultRowConverterisnull- Since:
- 0.9.0
-