27#include <com/sun/star/beans/XPropertyChangeListener.hpp>
28#include <com/sun/star/sdbc/XDriver.hpp>
29#include <com/sun/star/sdbc/XDriverManager2.hpp>
30#include <com/sun/star/sdbc/XConnectionPool.hpp>
31#include <com/sun/star/sdbc/XConnection.hpp>
32#include <com/sun/star/lang/XMultiServiceFactory.hpp>
33#include <com/sun/star/lang/XServiceInfo.hpp>
34#include <com/sun/star/uno/XComponentContext.hpp>
35#include <com/sun/star/frame/XDesktop2.hpp>
36#include <com/sun/star/frame/XTerminateListener.hpp>
37#include <com/sun/star/reflection/XProxyFactory.hpp>
38#include <osl/mutex.hxx>
43 class OConnectionPool;
48 typedef ::cppu::WeakImplHelper< css::sdbc::XConnectionPool,
49 css::lang::XServiceInfo,
50 css::frame::XTerminateListener,
51 css::beans::XPropertyChangeListener
62 css::uno::Reference< css::sdbc::XDriver >,
63 css::uno::WeakReference< css::sdbc::XDriver >>
69 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
70 css::uno::Reference< css::sdbc::XDriverManager2 >
m_xManager;
80 const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
85 static css::uno::Reference< css::uno::XInterface >
createWithProvider(
const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxConfProvider,
86 const OUString& _rPath);
87 static css::uno::Reference< css::uno::XInterface >
openNode(
const OUString& _rPath,
88 const css::uno::Reference< css::uno::XInterface >& _xTreeNode)
noexcept;
91 css::uno::Reference< css::uno::XInterface >& _rxDriverNode);
93 css::uno::Reference< css::sdbc::XDriver >& _rxDriver,
94 OUString& _rsImplName,
95 css::uno::Reference< css::uno::XInterface >& _rxDriverNode);
98 const css::uno::Reference< css::sdbc::XDriver >& _xDriver,
99 const css::uno::Reference< css::uno::XInterface >& _rxDriverNode);
106 static css::uno::Any
getNodeValue(
const OUString& _rPath,
107 const css::uno::Reference< css::uno::XInterface>& _xTreeNode)
noexcept;
110 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
getConnection(
const OUString& url )
override;
111 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL
getConnectionWithInfo(
const OUString& url,
const css::uno::Sequence< css::beans::PropertyValue >& info )
override;
116 virtual css::uno::Reference< css::sdbc::XDriver > SAL_CALL
getDriverByURL(
const OUString& url )
override;
123 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
125 virtual void SAL_CALL
propertyChange(
const css::beans::PropertyChangeEvent& evt )
override;
128 virtual void SAL_CALL
queryTermination(
const css::lang::EventObject& Event )
override;
129 virtual void SAL_CALL
notifyTermination(
const css::lang::EventObject& Event )
override;
OPoolCollection: control the whole connection pooling for oo.
css::uno::Reference< css::uno::XInterface > m_xConfigNode
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static css::uno::Any getNodeValue(const OUString &_rPath, const css::uno::Reference< css::uno::XInterface > &_xTreeNode) noexcept
virtual void SAL_CALL notifyTermination(const css::lang::EventObject &Event) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL setLoginTimeout(sal_Int32 seconds) override
virtual sal_Int32 SAL_CALL getLoginTimeout() override
OPoolCollection(const OPoolCollection &)=delete
MapDriver2DriverRef m_aDriverProxies
OConnectionPool * getConnectionPool(const OUString &_sImplName, const css::uno::Reference< css::sdbc::XDriver > &_xDriver, const css::uno::Reference< css::uno::XInterface > &_rxDriverNode)
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection(const OUString &url) override
virtual ~OPoolCollection() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
std::map< css::uno::Reference< css::sdbc::XDriver >, css::uno::WeakReference< css::sdbc::XDriver > > MapDriver2DriverRef
bool isPoolingEnabledByUrl(const OUString &_sUrl, css::uno::Reference< css::sdbc::XDriver > &_rxDriver, OUString &_rsImplName, css::uno::Reference< css::uno::XInterface > &_rxDriverNode)
bool isDriverPoolingEnabled(std::u16string_view _sDriverImplName, css::uno::Reference< css::uno::XInterface > &_rxDriverNode)
virtual OUString SAL_CALL getImplementationName() override
OPoolCollection(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
virtual void SAL_CALL queryTermination(const css::lang::EventObject &Event) override
static css::uno::Reference< css::uno::XInterface > openNode(const OUString &_rPath, const css::uno::Reference< css::uno::XInterface > &_xTreeNode) noexcept
virtual css::uno::Reference< css::sdbc::XDriver > SAL_CALL getDriverByURL(const OUString &url) override
css::uno::Reference< css::sdbc::XDriverManager2 > m_xManager
void clearConnectionPools(bool _bDispose)
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
static css::uno::Reference< css::uno::XInterface > createWithProvider(const css::uno::Reference< css::lang::XMultiServiceFactory > &_rxConfProvider, const OUString &_rPath)
css::uno::Reference< css::uno::XInterface > const & getConfigPoolRoot()
int operator=(const OPoolCollection &)=delete
OConnectionPools m_aPools
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnectionWithInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
css::uno::Reference< css::reflection::XProxyFactory > m_xProxyFactory
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop
std::map< OUString, rtl::Reference< OConnectionPool > > OConnectionPools
::cppu::WeakImplHelper< css::sdbc::XConnectionPool, css::lang::XServiceInfo, css::frame::XTerminateListener, css::beans::XPropertyChangeListener > OPoolCollection_Base