public static final class ProxyConnectionFactory.Builder extends Object
ConnectionFactory.
The returned ConnectionFactory is a proxy.
Registered listeners and configuration will be used throughout the operations of the proxy.
This class is not threadsafe.public ConnectionFactory build()
ConnectionFactory.ConnectionFactorypublic ProxyConnectionFactory.Builder proxyConfig(ProxyConfig proxyConfig)
ProxyConfig to use.proxyConfig - proxy configIllegalArgumentException - if proxyConfig is nullpublic ProxyConnectionFactory.Builder onBeforeMethod(Consumer<MethodExecutionInfo> consumer)
consumer - a consumer for before method executionIllegalArgumentException - if consumer is nullpublic ProxyConnectionFactory.Builder onAfterMethod(Consumer<MethodExecutionInfo> consumer)
consumer - a consumer for after method executionIllegalArgumentException - if consumer is nullpublic ProxyConnectionFactory.Builder onBeforeQuery(Consumer<QueryExecutionInfo> consumer)
consumer - a consumer for before query executionIllegalArgumentException - if consumer is nullpublic ProxyConnectionFactory.Builder onAfterQuery(Consumer<QueryExecutionInfo> consumer)
consumer - a consumer for after query executionIllegalArgumentException - if consumer is nullpublic ProxyConnectionFactory.Builder onEachQueryResult(Consumer<QueryExecutionInfo> consumer)
consumer - a consumer for each query resultIllegalArgumentException - if consumer is nullpublic ProxyConnectionFactory.Builder listener(ProxyExecutionListener listener)
ProxyExecutionListener.listener - a listener to registerIllegalArgumentException - if listener is null@Deprecated public ProxyConnectionFactory.Builder listener(LifeCycleListener lifeCycleListener)
listener(ProxyExecutionListener) with ProxyMethodExecutionListenerLifeCycleListener.lifeCycleListener - a listener to registerIllegalArgumentException - if lifeCycleListener is nullCopyright © 2020. All rights reserved.