LibreOffice Module connectivity (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
connectivity::OPoolCollection Class Reference

OPoolCollection: control the whole connection pooling for oo. More...

#include <ZPoolCollection.hxx>

Inheritance diagram for connectivity::OPoolCollection:
[legend]
Collaboration diagram for connectivity::OPoolCollection:
[legend]

Public Member Functions

 OPoolCollection (const OPoolCollection &)=delete
 
int operator= (const OPoolCollection &)=delete
 
 OPoolCollection (const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection (const OUString &url) override
 
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnectionWithInfo (const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
 
virtual void SAL_CALL setLoginTimeout (sal_Int32 seconds) override
 
virtual sal_Int32 SAL_CALL getLoginTimeout () override
 
virtual css::uno::Reference< css::sdbc::XDriver > SAL_CALL getDriverByURL (const OUString &url) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual void SAL_CALL queryTermination (const css::lang::EventObject &Event) override
 
virtual void SAL_CALL notifyTermination (const css::lang::EventObject &Event) override
 

Static Public Member Functions

static css::uno::Any getNodeValue (const OUString &_rPath, const css::uno::Reference< css::uno::XInterface > &_xTreeNode) noexcept
 

Protected Member Functions

virtual ~OPoolCollection () override
 

Private Types

typedef std::map< OUString, rtl::Reference< OConnectionPool > > OConnectionPools
 
typedef std::map< css::uno::Reference< css::sdbc::XDriver >, css::uno::WeakReference< css::sdbc::XDriver > > MapDriver2DriverRef
 

Private Member Functions

css::uno::Reference< css::uno::XInterface > const & getConfigPoolRoot ()
 
bool isPoolingEnabled ()
 
bool isDriverPoolingEnabled (std::u16string_view _sDriverImplName, css::uno::Reference< css::uno::XInterface > &_rxDriverNode)
 
bool isPoolingEnabledByUrl (const OUString &_sUrl, css::uno::Reference< css::sdbc::XDriver > &_rxDriver, OUString &_rsImplName, css::uno::Reference< css::uno::XInterface > &_rxDriverNode)
 
OConnectionPoolgetConnectionPool (const OUString &_sImplName, const css::uno::Reference< css::sdbc::XDriver > &_xDriver, const css::uno::Reference< css::uno::XInterface > &_rxDriverNode)
 
void clearConnectionPools (bool _bDispose)
 
void clearDesktop ()
 

Static Private Member Functions

static css::uno::Reference< css::uno::XInterface > createWithProvider (const css::uno::Reference< css::lang::XMultiServiceFactory > &_rxConfProvider, const OUString &_rPath)
 
static css::uno::Reference< css::uno::XInterface > openNode (const OUString &_rPath, const css::uno::Reference< css::uno::XInterface > &_xTreeNode) noexcept
 

Private Attributes

MapDriver2DriverRef m_aDriverProxies
 
::osl::Mutex m_aMutex
 
OConnectionPools m_aPools
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::sdbc::XDriverManager2 > m_xManager
 
css::uno::Reference< css::reflection::XProxyFactory > m_xProxyFactory
 
css::uno::Reference< css::uno::XInterface > m_xConfigNode
 
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop
 

Detailed Description

OPoolCollection: control the whole connection pooling for oo.

Definition at line 55 of file ZPoolCollection.hxx.

Member Typedef Documentation

◆ MapDriver2DriverRef

typedef std::map< css::uno::Reference< css::sdbc::XDriver >, css::uno::WeakReference< css::sdbc::XDriver > > connectivity::OPoolCollection::MapDriver2DriverRef
private

Definition at line 64 of file ZPoolCollection.hxx.

◆ OConnectionPools

Definition at line 59 of file ZPoolCollection.hxx.

Constructor & Destructor Documentation

◆ OPoolCollection() [1/2]

connectivity::OPoolCollection::OPoolCollection ( const OPoolCollection )
delete

◆ OPoolCollection() [2/2]

connectivity::OPoolCollection::OPoolCollection ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext)
explicit

◆ ~OPoolCollection()

OPoolCollection::~OPoolCollection ( )
overrideprotectedvirtual

Definition at line 94 of file ZPoolCollection.cxx.

References clearConnectionPools().

Member Function Documentation

◆ clearConnectionPools()

void OPoolCollection::clearConnectionPools ( bool  _bDispose)
private

Definition at line 262 of file ZPoolCollection.cxx.

References m_aPools.

Referenced by clearDesktop(), propertyChange(), and ~OPoolCollection().

◆ clearDesktop()

void OPoolCollection::clearDesktop ( )
private

Definition at line 452 of file ZPoolCollection.cxx.

References clearConnectionPools(), and m_xDesktop.

Referenced by disposing(), and notifyTermination().

◆ createWithProvider()

Reference< XInterface > OPoolCollection::createWithProvider ( const css::uno::Reference< css::lang::XMultiServiceFactory > &  _rxConfProvider,
const OUString &  _rPath 
)
staticprivate

Definition at line 294 of file ZPoolCollection.cxx.

References Any, and args.

Referenced by getConfigPoolRoot().

◆ disposing()

void SAL_CALL OPoolCollection::disposing ( const css::lang::EventObject &  Source)
overridevirtual

◆ getConfigPoolRoot()

Reference< XInterface > const & OPoolCollection::getConfigPoolRoot ( )
private

◆ getConnection()

Reference< XConnection > SAL_CALL OPoolCollection::getConnection ( const OUString &  url)
overridevirtual

Definition at line 99 of file ZPoolCollection.cxx.

References getConnectionWithInfo().

◆ getConnectionPool()

OConnectionPool * OPoolCollection::getConnectionPool ( const OUString &  _sImplName,
const css::uno::Reference< css::sdbc::XDriver > &  _xDriver,
const css::uno::Reference< css::uno::XInterface > &  _rxDriverNode 
)
private

Definition at line 271 of file ZPoolCollection.cxx.

References getEnableNodeName(), m_aPools, and m_xProxyFactory.

Referenced by getConnectionWithInfo(), and getDriverByURL().

◆ getConnectionWithInfo()

Reference< XConnection > SAL_CALL OPoolCollection::getConnectionWithInfo ( const OUString &  url,
const css::uno::Sequence< css::beans::PropertyValue > &  info 
)
overridevirtual

◆ getDriverByURL()

Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL ( const OUString &  url)
overridevirtual

◆ getImplementationName()

OUString SAL_CALL OPoolCollection::getImplementationName ( )
overridevirtual

Definition at line 136 of file ZPoolCollection.cxx.

◆ getLoginTimeout()

sal_Int32 SAL_CALL OPoolCollection::getLoginTimeout ( )
overridevirtual

Definition at line 130 of file ZPoolCollection.cxx.

References m_aMutex, and m_xManager.

◆ getNodeValue()

Any OPoolCollection::getNodeValue ( const OUString &  _rPath,
const css::uno::Reference< css::uno::XInterface > &  _xTreeNode 
)
staticnoexcept

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL OPoolCollection::getSupportedServiceNames ( )
overridevirtual

Definition at line 147 of file ZPoolCollection.cxx.

◆ isDriverPoolingEnabled()

bool OPoolCollection::isDriverPoolingEnabled ( std::u16string_view  _sDriverImplName,
css::uno::Reference< css::uno::XInterface > &  _rxDriverNode 
)
private

◆ isPoolingEnabled()

bool OPoolCollection::isPoolingEnabled ( )
private

◆ isPoolingEnabledByUrl()

bool OPoolCollection::isPoolingEnabledByUrl ( const OUString &  _sUrl,
css::uno::Reference< css::sdbc::XDriver > &  _rxDriver,
OUString &  _rsImplName,
css::uno::Reference< css::uno::XInterface > &  _rxDriverNode 
)
private

◆ notifyTermination()

void SAL_CALL OPoolCollection::notifyTermination ( const css::lang::EventObject &  Event)
overridevirtual

Definition at line 374 of file ZPoolCollection.cxx.

References clearDesktop().

◆ openNode()

Reference< XInterface > OPoolCollection::openNode ( const OUString &  _rPath,
const css::uno::Reference< css::uno::XInterface > &  _xTreeNode 
)
staticprivatenoexcept

Definition at line 309 of file ZPoolCollection.cxx.

References Exception, SAL_WARN, SAL_WARN_IF, and TOOLS_WARN_EXCEPTION.

Referenced by isDriverPoolingEnabled().

◆ operator=()

int connectivity::OPoolCollection::operator= ( const OPoolCollection )
delete

◆ propertyChange()

void SAL_CALL OPoolCollection::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overridevirtual

◆ queryTermination()

void SAL_CALL OPoolCollection::queryTermination ( const css::lang::EventObject &  Event)
overridevirtual

Definition at line 370 of file ZPoolCollection.cxx.

◆ setLoginTimeout()

void SAL_CALL OPoolCollection::setLoginTimeout ( sal_Int32  seconds)
overridevirtual

Definition at line 124 of file ZPoolCollection.cxx.

References m_aMutex, and m_xManager.

◆ supportsService()

sal_Bool SAL_CALL OPoolCollection::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 141 of file ZPoolCollection.cxx.

References cppu::supportsService().

Member Data Documentation

◆ m_aDriverProxies

MapDriver2DriverRef connectivity::OPoolCollection::m_aDriverProxies
private

Definition at line 66 of file ZPoolCollection.hxx.

Referenced by getDriverByURL(), and propertyChange().

◆ m_aMutex

::osl::Mutex connectivity::OPoolCollection::m_aMutex
private

◆ m_aPools

OConnectionPools connectivity::OPoolCollection::m_aPools
private

Definition at line 68 of file ZPoolCollection.hxx.

Referenced by clearConnectionPools(), getConnectionPool(), and propertyChange().

◆ m_xConfigNode

css::uno::Reference< css::uno::XInterface > connectivity::OPoolCollection::m_xConfigNode
private

Definition at line 72 of file ZPoolCollection.hxx.

Referenced by disposing(), getConfigPoolRoot(), and propertyChange().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > connectivity::OPoolCollection::m_xContext
private

Definition at line 69 of file ZPoolCollection.hxx.

Referenced by getConfigPoolRoot().

◆ m_xDesktop

css::uno::Reference< css::frame::XDesktop2> connectivity::OPoolCollection::m_xDesktop
private

Definition at line 73 of file ZPoolCollection.hxx.

Referenced by clearDesktop(), and disposing().

◆ m_xManager

css::uno::Reference< css::sdbc::XDriverManager2 > connectivity::OPoolCollection::m_xManager
private

Definition at line 70 of file ZPoolCollection.hxx.

Referenced by getLoginTimeout(), isPoolingEnabledByUrl(), and setLoginTimeout().

◆ m_xProxyFactory

css::uno::Reference< css::reflection::XProxyFactory > connectivity::OPoolCollection::m_xProxyFactory
private

Definition at line 71 of file ZPoolCollection.hxx.

Referenced by getConnectionPool(), and getDriverByURL().


The documentation for this class was generated from the following files: