Class ProxyConfig
java.lang.Object
io.r2dbc.proxy.callback.ProxyConfig
Central configuration object for the proxy.
- Author:
- Tadaya Tsuyukubo
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ProxyExecutionListener listener) RegisterProxyExecutionListener.static ProxyConfig.Builderbuilder()Creates a newProxyConfig.Builder.Returns theBindParameterConverter.getClock()Returns theClock.Returns theConnectionIdManager.ReturnsCompositeProxyExecutionListenerthat contains registeredProxyExecutionListener.Returns theProxyFactorygenerated from the specifiedProxyFactoryFactory.Returns theResultRowConverter.voidsetBindParameterConverter(BindParameterConverter bindParameterConverter) Sets theBindParameterConverter.voidSets theClockused to calculate elapsed time.voidsetConnectionIdManager(ConnectionIdManager connectionIdManager) Sets theConnectionIdManager.voidsetProxyFactoryFactory(ProxyFactoryFactory proxyFactoryFactory) Sets theProxyFactoryFactory.voidsetResultRowConverter(ResultRowConverter resultRowConverter) Sets theResultRowConverter.
-
Constructor Details
-
ProxyConfig
public ProxyConfig()
-
-
Method Details
-
builder
-
setProxyFactoryFactory
Sets theProxyFactoryFactory. 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
Returns theProxyFactorygenerated 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
Returns theConnectionIdManager.- Returns:
- connection id manager
-
setConnectionIdManager
Sets theConnectionIdManager.- Parameters:
connectionIdManager- connection id manager- Throws:
IllegalArgumentException- ifconnectionIdManagerisnull
-
getClock
-
setClock
Sets theClockused to calculate elapsed time.- Parameters:
clock- clock to use- Throws:
IllegalArgumentException- ifclockisnull- See Also:
-
getBindParameterConverter
Returns theBindParameterConverter.- Returns:
- bindParameterConverter to use
-
setBindParameterConverter
Sets theBindParameterConverter.- Parameters:
bindParameterConverter- bind parameter converter- Throws:
IllegalArgumentException- ifbindParameterConverterisnull
-
getResultRowConverter
Returns theResultRowConverter.- Returns:
- resultRowConverter to use
- Since:
- 0.9.0
-
setResultRowConverter
Sets theResultRowConverter.- Parameters:
resultRowConverter- the result row converter- Throws:
IllegalArgumentException- ifresultRowConverterisnull- Since:
- 0.9.0
-