#include <OW_ClientCIMOMHandleConnectionPool.hpp>
Inheritance diagram for OW_NAMESPACE::ClientCIMOMHandleConnectionPool:
Public Member Functions | |
ClientCIMOMHandleConnectionPool (unsigned maxConnectionsPerUrl) | |
ClientCIMOMHandleRef | getConnection (const String &url) |
Get a new ClientCIMOMHandleRef connected to url. | |
void | addConnectionToPool (const ClientCIMOMHandleRef &handle, const String &url) |
Add a ClientCIMOMHandleRef back to the pool. | |
Private Types | |
typedef std::multimap< String, ClientCIMOMHandleRef > | pool_t |
Private Member Functions | |
ClientCIMOMHandleConnectionPool (const ClientCIMOMHandleConnectionPool &) | |
ClientCIMOMHandleConnectionPool & | operator= (const ClientCIMOMHandleConnectionPool &) |
Private Attributes | |
unsigned | m_maxConnectionsPerUrl |
Mutex | m_guard |
pool_t | m_pool |
Classes | |
class | HandleReturner |
This class facilitates usage of RAII when using a ClientCIMOMHandleConnectionPool. More... |
Each separate url is considered a different cimom. Connections are persistent.
Invariant: For each given url, a maximum of m_maxConnectionsPerUrl will be stored. Thread safety: read/write Copy semantics: Non-copyable Exception safety: Strong
Definition at line 61 of file OW_ClientCIMOMHandleConnectionPool.hpp.
|
Definition at line 137 of file OW_ClientCIMOMHandleConnectionPool.hpp. |
|
Definition at line 45 of file OW_ClientCIMOMHandleConnectionPool.cpp. |
|
|
|
Add a ClientCIMOMHandleRef back to the pool. handle must be connected to url. If there are already m_maxConnectionsPerUrl ClientCIMOMHandleRef instances for url already in the pool, it won't be added to the pool. After calling this function, the caller can no longer use handle.
Definition at line 70 of file OW_ClientCIMOMHandleConnectionPool.cpp. References m_guard, m_maxConnectionsPerUrl, and m_pool. Referenced by OW_NAMESPACE::ProviderAgentProviderEnvironment::~ProviderAgentProviderEnvironment(). |
|
Get a new ClientCIMOMHandleRef connected to url. If there is one in the pool, it will be retrieved, otherwise a new connection will be created. The http protocol only authenticates when the connection is established, so each existing connection will already be authenticated. For this reason, the credentials should be part of the url, and a ClientAuthCBIFCRef will not be supplied to the ClientCIMOMHandleRef.
Definition at line 52 of file OW_ClientCIMOMHandleConnectionPool.cpp. References OW_NAMESPACE::ClientCIMOMHandle::createFromURL(), m_guard, and m_pool. |
|
|
|
Definition at line 130 of file OW_ClientCIMOMHandleConnectionPool.hpp. Referenced by addConnectionToPool(), and getConnection(). |
|
Definition at line 129 of file OW_ClientCIMOMHandleConnectionPool.hpp. Referenced by addConnectionToPool(). |
|
Definition at line 138 of file OW_ClientCIMOMHandleConnectionPool.hpp. Referenced by addConnectionToPool(), and getConnection(). |