1 karl 1.22 //%2006////////////////////////////////////////////////////////////////////////
|
2 chip 1.1 //
|
3 karl 1.18 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.3 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.18 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.19 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.22 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 chip 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 karl 1.18 //
|
21 chip 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Author: Chip Vincent (cvincent@us.ibm.com)
33 //
34 // Modified By:
35 // Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
36 // Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
37 // Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
38 // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
39 // Carol Ann Krug Graves, Hewlett-Packard Company
40 // (carolann_graves@hp.com)
41 // Mike Day, IBM (mdday@us.ibm.com)
|
42 schuur 1.4 // Adrian Schuur (schuur@de.ibm.com)
|
43 kumpf 1.16 // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
44 chip 1.1 //
45 //%/////////////////////////////////////////////////////////////////////////////
46
47 #ifndef Pegasus_DefaultProviderManager_h
48 #define Pegasus_DefaultProviderManager_h
49
50 #include <Pegasus/Common/Config.h>
51 #include <Pegasus/Common/Constants.h>
52 #include <Pegasus/Common/CIMObjectPath.h>
53 #include <Pegasus/Common/Pair.h>
54 #include <Pegasus/Common/Triad.h>
55 #include <Pegasus/Common/Thread.h>
|
56 kumpf 1.21 #include <Pegasus/Common/IPC.h>
|
57 chip 1.1 #include <Pegasus/Common/HashTable.h>
|
58 kumpf 1.14 #include <Pegasus/Common/OperationContextInternal.h>
|
59 chip 1.1
60 #include <Pegasus/ProviderManager2/ProviderManager.h>
|
61 schuur 1.7 #include <Pegasus/ProviderManager2/ProviderName.h>
|
62 chip 1.1
63 #include <Pegasus/ProviderManager2/Default/LocalProviderManager.h>
|
64 schuur 1.9 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
|
65 chip 1.1 #include <Pegasus/ProviderManager2/Default/Provider.h>
66
|
67 schuur 1.8 #include <Pegasus/ProviderManager2/Default/Linkage.h>
|
68 chip 1.1
69 PEGASUS_NAMESPACE_BEGIN
70
71 typedef HashTable<String,
|
72 dj.gorey 1.13 EnableIndicationsResponseHandler *,
73 EqualFunc<String>,
74 HashFunc<String> > IndicationResponseTable;
|
75 chip 1.1
|
76 schuur 1.8 class PEGASUS_DEFPM_LINKAGE DefaultProviderManager : public ProviderManager
|
77 chip 1.1 {
78 public:
79 DefaultProviderManager(void);
80 virtual ~DefaultProviderManager(void);
81
|
82 dj.gorey 1.13 virtual Message * processMessage(Message * request);
|
83 chip 1.1
|
84 kumpf 1.16 virtual Boolean hasActiveProviders();
85 virtual void unloadIdleProviders();
86
|
87 chip 1.1 protected:
|
88 dj.gorey 1.13 Message * handleUnsupportedRequest(const Message * message);
|
89 chip 1.1
|
90 dj.gorey 1.13 Message * handleGetInstanceRequest(const Message * message);
91 Message * handleEnumerateInstancesRequest(const Message * message);
92 Message * handleEnumerateInstanceNamesRequest(const Message * message);
93 Message * handleCreateInstanceRequest(const Message * message);
94 Message * handleModifyInstanceRequest(const Message * message);
95 Message * handleDeleteInstanceRequest(const Message * message);
96
97 Message * handleExecQueryRequest(const Message * message);
98
99 Message * handleAssociatorsRequest(const Message * message);
100 Message * handleAssociatorNamesRequest(const Message * message);
101 Message * handleReferencesRequest(const Message * message);
102 Message * handleReferenceNamesRequest(const Message * message);
103
104 Message * handleGetPropertyRequest(const Message * message);
105 Message * handleSetPropertyRequest(const Message * message);
106
107 Message * handleInvokeMethodRequest(const Message * message);
108
109 Message * handleCreateSubscriptionRequest(const Message * message);
110 Message * handleModifySubscriptionRequest(const Message * message);
111 dj.gorey 1.13 Message * handleDeleteSubscriptionRequest(const Message * message);
112
113 Message * handleExportIndicationRequest(const Message * message);
114
115 Message * handleDisableModuleRequest(const Message * message);
116 Message * handleEnableModuleRequest(const Message * message);
117 Message * handleStopAllProvidersRequest(const Message * message);
|
118 kumpf 1.15 Message * handleInitializeProviderRequest(const Message * message);
|
119 carolann.graves 1.20 Message * handleSubscriptionInitCompleteRequest
120 (const Message * message);
|
121 chip 1.1
|
122 kumpf 1.21 void _insertEntry(
123 const Provider & provider,
124 EnableIndicationsResponseHandler* handler);
|
125 chip 1.1 EnableIndicationsResponseHandler * _removeEntry(const String & key);
126
127 String _generateKey(const Provider & provider);
|
128 schuur 1.6 String _generateKey(const String & providerName,const String & providerFileName);
|
129 chip 1.1
|
130 kumpf 1.14 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
|
131 chip 1.2
|
132 chip 1.1 protected:
133 IndicationResponseTable _responseTable;
|
134 kumpf 1.21 Mutex _responseTableMutex;
|
135 kumpf 1.16 LocalProviderManager providerManager;
|
136 carolann.graves 1.20
137 private:
138
139 /**
140 Calls the provider's enableIndications() method.
141 If successful, the indications response handler is stored in the
142 _responseTable.
143
144 @param req_provider CIMInstance for the provider to be enabled
145 @param _indicationCallback PEGASUS_INDICATION_CALLBACK for indications
146 @param ph OpProviderHolder for the provider to be enabled
147
148 Note that since an exception thrown by the provider's
149 enableIndications() method is considered a provider error, any such
150 exception is ignored, and no exceptions are thrown by this method.
151 */
152 void _callEnableIndications
153 (CIMInstance & req_provider,
154 PEGASUS_INDICATION_CALLBACK _indicationCallback,
155 OpProviderHolder & ph);
|
156 chip 1.1 };
157
158 PEGASUS_NAMESPACE_END
159
160 #endif
|