⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stafconnectionmanager.h

📁 Software Testing Automation Framework (STAF)的开发代码
💻 H
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2001                                              *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/#ifndef STAF_ConnectionManager#define STAF_ConnectionManager#include "STAF.h"#include "STAFString.h"#include "STAFConnectionProvider.h"#include "STAFTimestamp.h"class STAFConnectionManager{public:    STAFConnectionManager();    typedef std::deque<STAFString> ConnectionProviderOptionList;    typedef std::map<STAFString, STAFConnectionProviderPtr>        ConnectionProviderMap;    typedef std::deque<STAFConnectionProviderPtr> ConnectionProviderList;    struct EndpointCacheData    {        EndpointCacheData()        { /* Do Nothing */ }                EndpointCacheData(const STAFString &aInterface)            : interface(aInterface),              createdTimestamp(STAFTimestamp::now())        { /* Do Nothing */ }        STAFString interface;        STAFTimestamp createdTimestamp;    };    typedef std::map<STAFString, EndpointCacheData> EndpointCacheMap;    STAFRC_t addConnectionProvider(                 const STAFString &name,                 const STAFString &library,                 const ConnectionProviderOptionList &optionList,                 STAFString &errorBuffer);    STAFRC_t setDefaultConnectionProvider(const STAFString &name);    STAFString getDefaultConnectionProvider();    STAFRC_t enableAutoInterfaceCycling();    STAFRC_t disableAutoInterfaceCycling();    bool getAutoInterfaceCycling();        ConnectionProviderList getConnectionProviderListCopy();    STAFRC_t makeConnection(const STAFString &where,                            STAFConnectionPtr &connection,                            STAFString &errorBuffer);    STAFRC_t makeConnection(const STAFString &where,                            STAFConnectionProviderPtr &provider,                            STAFConnectionPtr &connection,                            STAFString &errorBuffer);    STAFRC_t attemptConnection(const STAFString &interface,                               const STAFString &endpoint,                               STAFConnectionProviderPtr &provider,                               STAFConnectionPtr &connection,                               STAFString &errorBuffer);    STAFRC_t addToEndpointCache(const STAFString &endpoint,                                const STAFString &interface);    STAFRC_t removeFromEndpointCache(const STAFString &endpoint);    STAFRC_t purgeEndpointCache();    STAFRC_t getCachedInterface(const STAFString &endpoint,                                STAFString &interface);    unsigned int getEndpointCacheSize();    EndpointCacheMap getEndpointCacheMapCopy();    ~STAFConnectionManager();private:    ConnectionProviderMap fConnProvMap;    ConnectionProviderList fConnProvList;    EndpointCacheMap fEndpointCacheMap;    STAFString fDefaultConnProv;    STAFMutexSem fEndpointCacheMapSem;    STAFMutexSem fAutoInterfaceCyclingSem;    bool fAutoInterfaceCycling;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -