00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_PROVIDERMANAGER_HPP_
00036 #define OW_PROVIDERMANAGER_HPP_
00037 #include "OW_config.h"
00038 #include "OW_InstanceProviderIFC.hpp"
00039 #include "OW_MethodProviderIFC.hpp"
00040 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00041 #include "OW_AssociatorProviderIFC.hpp"
00042 #endif
00043 #include "OW_PolledProviderIFC.hpp"
00044 #include "OW_IndicationExportProviderIFC.hpp"
00045 #include "OW_IndicationProviderIFC.hpp"
00046 #include "OW_SecondaryInstanceProviderIFC.hpp"
00047 #include "OW_ProviderIFCLoader.hpp"
00048 #include "OW_Mutex.hpp"
00049 #include "OW_HashMap.hpp"
00050 #include "OW_HashMultiMap.hpp"
00051 #include "OW_ServiceIFC.hpp"
00052 #include "OW_Logger.hpp"
00053 #include "OW_CimomCommonFwd.hpp"
00054 #include "OW_SortedVectorSet.hpp"
00055
00056 namespace OW_NAMESPACE
00057 {
00058
00064 class OW_CIMOMCOMMON_API ProviderManager : public ServiceIFC
00065 {
00066 public:
00074 void load(const ProviderIFCLoaderRef& ifcLoader, const ServiceEnvironmentIFCRef& env);
00075
00076 virtual String getName() const;
00082 virtual void init(const ServiceEnvironmentIFCRef& env);
00083
00088 virtual void shutdown();
00089
00095 virtual void shuttingDown();
00096
00113 InstanceProviderIFCRef getInstanceProvider(const ProviderEnvironmentIFCRef& env,
00114 const String& ns, const CIMClass& cc) const;
00115
00125 SecondaryInstanceProviderIFCRefArray getSecondaryInstanceProviders(const ProviderEnvironmentIFCRef& env,
00126 const String& ns, const CIMName& className) const;
00141 MethodProviderIFCRef getMethodProvider(const ProviderEnvironmentIFCRef& env,
00142 const String& ns, const CIMClass& cc, const CIMMethod& method) const;
00143 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00144
00160 AssociatorProviderIFCRef getAssociatorProvider(const ProviderEnvironmentIFCRef& env,
00161 const String& ns, const CIMClass& cc) const;
00162 #endif
00163
00167 IndicationExportProviderIFCRefArray
00168 getIndicationExportProviders(const ProviderEnvironmentIFCRef& env) const;
00173 PolledProviderIFCRefArray
00174 getPolledProviders(const ProviderEnvironmentIFCRef& env) const;
00182 IndicationProviderIFCRefArray
00183 getIndicationProviders(const ProviderEnvironmentIFCRef& env,
00184 const String& ns, const CIMName& indicationClassName,
00185 const CIMNameArray& monitoredClassNames) const;
00190 void unloadProviders(const ProviderEnvironmentIFCRef& env);
00191 private:
00192 ProviderIFCBaseIFCRef getProviderIFC(const ProviderEnvironmentIFCRef& env,
00193 const CIMQualifier& qual,
00194 String& provStr) const;
00195 bool isRestrictedNamespace(const String& ns) const;
00196 Array<ProviderIFCBaseIFCRef> m_IFCArray;
00197 Mutex m_guard;
00198 public:
00199 struct ProvReg
00200 {
00201 String provName;
00202 ProviderIFCBaseIFCRef ifc;
00203 };
00204 typedef HashMap<String, ProvReg> ProvRegMap_t;
00205 typedef HashMultiMap<String, ProvReg> MultiProvRegMap_t;
00206 typedef SortedVectorSet<String> NameSpaceSet_t;
00207
00208 static String COMPONENT_NAME;
00209
00210 private:
00211
00212 void findIndicationProviders(
00213 const ProviderEnvironmentIFCRef& env,
00214 const String& ns,
00215 const CIMName& className,
00216 const ProviderManager::MultiProvRegMap_t& indProvs,
00217 IndicationProviderIFCRefArray& rval) const;
00218
00219
00220
00221 ProvRegMap_t m_registeredInstProvs;
00222
00223
00224
00225 MultiProvRegMap_t m_registeredSecInstProvs;
00226
00227 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00228 ProvRegMap_t m_registeredAssocProvs;
00229 #endif
00230
00231 ProvRegMap_t m_registeredMethProvs;
00232
00233 ProvRegMap_t m_registeredPropProvs;
00234
00235
00236
00237 MultiProvRegMap_t m_registeredIndProvs;
00238
00239 LoggerRef m_logger;
00240 ServiceEnvironmentIFCRef m_env;
00241 NameSpaceSet_t m_restrictedNamespaces;
00242 };
00243
00244 }
00245
00246 #endif