1 mday 1.29 //%////-*-c++-*-////////////////////////////////////////////////////////////////
|
2 chip 1.1 //
|
3 mday 1.30 // Copyright (c) 2000 - 2003 BMC Software, Hewlett-Packard Company, IBM,
|
4 kumpf 1.25 // The Open Group, Tivoli Systems
|
5 chip 1.1 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
|
12 kumpf 1.25 //
|
13 chip 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 //==============================================================================
23 //
24 // Author: Chip Vincent (cvincent@us.ibm.com)
25 //
26 // Modified By:
27 // Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
28 // Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
29 // Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
30 // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
|
31 kumpf 1.28 // Carol Ann Krug Graves, Hewlett-Packard Company
32 // (carolann_graves@hp.com)
|
33 mday 1.30 // Mike Day, IBM (mdday@us.ibm.com)
|
34 chip 1.1 //
35 //%/////////////////////////////////////////////////////////////////////////////
36
37 #ifndef Pegasus_ProviderManagerService_h
38 #define Pegasus_ProviderManagerService_h
39
40 #include <Pegasus/Common/Config.h>
|
41 chip 1.23 #include <Pegasus/Common/MessageQueueService.h>
42 #include <Pegasus/Common/CIMObjectPath.h>
|
43 chip 1.3 #include <Pegasus/Common/Pair.h>
|
44 sage 1.24 #include <Pegasus/Common/Triad.h>
|
45 chip 1.3 #include <Pegasus/Common/Thread.h>
|
46 chip 1.6
47 #include <Pegasus/ProviderManager/SafeQueue.h>
|
48 kumpf 1.27 #include <Pegasus/Server/Linkage.h>
|
49 mday 1.29 #include <Pegasus/ProviderManager/OperationResponseHandler.h>
50 #include <Pegasus/Common/HashTable.h>
51 #include <Pegasus/ProviderManager/Provider.h>
52 #include <Pegasus/Common/Constants.h>
53 PEGASUS_NAMESPACE_BEGIN
|
54 chip 1.1
|
55 mday 1.30
|
56 mday 1.29 typedef HashTable<String,
57 EnableIndicationsResponseHandler *,
58 EqualFunc<String>,
59 HashFunc<String> > IndicationResponseTable;
|
60 chip 1.1
|
61 kumpf 1.9 class ProviderRegistrationManager;
|
62 chip 1.3
|
63 chip 1.1 class PEGASUS_SERVER_LINKAGE ProviderManagerService : public MessageQueueService
64 {
|
65 chip 1.3 public:
|
66 chip 1.10 ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager);
|
67 chip 1.8 virtual ~ProviderManagerService(void);
|
68 mday 1.30 static ProviderManager *getProviderManager(void);
69
|
70 mday 1.26
|
71 chip 1.3 protected:
|
72 chip 1.8 virtual Boolean messageOK(const Message * message);
73 virtual void handleEnqueue(void);
74 virtual void handleEnqueue(Message * message);
75
76 virtual void _handle_async_request(AsyncRequest * request);
|
77 chip 1.3
78 protected:
|
79 mday 1.30 virtual Triad<String, String, String>
|
80 kumpf 1.32 _lookupConsumerProvider(const String & destinationPath);
|
81 mday 1.30
|
82 sage 1.24 virtual Triad<String, String, String>
83 _lookupProviderForClass(const CIMObjectPath & objectPath);
84
85 virtual Triad<String, String, String> _lookupMethodProviderForClass(
|
86 kumpf 1.22 const CIMObjectPath & objectPath,
|
87 kumpf 1.28 const CIMName & methodName);
|
88 chip 1.3
|
89 sage 1.17 virtual void _lookupProviderForAssocClass(
|
90 kumpf 1.33 const CIMNamespaceName& nameSpace,
|
91 karl 1.31 const CIMName& assocClassName,
92 Array<String>& Locations,
93 Array<String>& providerNames,
|
94 sage 1.24 Array<String>& interfaceNames);
|
95 sage 1.17
|
96 chip 1.8 protected:
|
97 chip 1.23 //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
|
98 chip 1.1
|
99 chip 1.8 //void handleStartService();
100 //void handleStopService();
101 //void handlePauseService();
102 //void handleResumeService();
103
104 static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(void * arg) throw();
105
|
106 chip 1.13 //void handleGetClassRequest(const Message * message) throw();
107 //void handleEnumerateClassesRequest(const Message * message) throw();
108 //void handleEnumerateClassNamesRequest(const Message * message) throw();
109 //void handleCreateClassRequest(const Message * message) throw();
110 //void handleModifyClassRequest(const Message * message) throw();
111 //void handleDeleteClassRequest(const Message * message) throw();
112
|
113 mday 1.19 void handleGetInstanceRequest(AsyncOpNode *op, const Message *message) throw();
114 void handleEnumerateInstancesRequest(AsyncOpNode *op, const Message *message) throw();
115 void handleEnumerateInstanceNamesRequest(AsyncOpNode *op, const Message *message) throw();
116 void handleCreateInstanceRequest(AsyncOpNode *op, const Message *message) throw();
117 void handleModifyInstanceRequest(AsyncOpNode *op, const Message *message) throw();
118 void handleDeleteInstanceRequest(AsyncOpNode *op, const Message *message) throw();
119
120 void handleExecuteQueryRequest(AsyncOpNode *op, const Message *message) throw();
121
122 void handleAssociatorsRequest(AsyncOpNode *op, const Message *message) throw();
123 void handleAssociatorNamesRequest(AsyncOpNode *op, const Message *message) throw();
124 void handleReferencesRequest(AsyncOpNode *op, const Message *message) throw();
125 void handleReferenceNamesRequest(AsyncOpNode *op, const Message *message) throw();
126
127 void handleGetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
128 void handleSetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
129
130 void handleInvokeMethodRequest(AsyncOpNode *op, const Message *message) throw();
131
132 void handleCreateSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
133 void handleModifySubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
134 mday 1.19 void handleDeleteSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
135 void handleEnableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
136 void handleDisableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
|
137 chip 1.20
|
138 mday 1.19 void handleDisableModuleRequest(AsyncOpNode *op, const Message *message) throw();
139 void handleEnableModuleRequest(AsyncOpNode *op, const Message *message) throw();
|
140 kumpf 1.21 void handleStopAllProvidersRequest(AsyncOpNode *op, const Message *message) throw();
|
141 kumpf 1.32 void handleExportIndicationRequest(AsyncOpNode *op,
|
142 mday 1.30 const Message *message) throw();
143
|
144 mday 1.29
145 /**
146 Inserts an entry into the enabled indication providers table.
147
148 @param provider the provider instance
149 @param handler pointer to the indication response handler
150 */
151
152 void _insertEntry(
153 const Provider & provider,
154 const EnableIndicationsResponseHandler *handler);
155
156 /**
157 Generates a String key from by combining the provider and provider
158 module names.
159
160 @param provider the provider instance
161
|
162 kumpf 1.34 @return the generated key
|
163 mday 1.29 */
164
165
|
166 kumpf 1.34 void _removeEntry(const String & key);
|
167 mday 1.29
168
169
170 String _generateKey (
171 const Provider & provider);
|
172 kumpf 1.35
173 /**
174 Generates a String key by combining the provider name and provider
175 file name.
176
177 @param providerName the name of the provider
178 @param providerFileName the provider file name
179
180 @return the generated key
181 */
182 String _generateKey (const String & providerName,
183 const String & providerFileName);
184
|
185 mday 1.29
|
186 chip 1.3 protected:
|
187 chip 1.8
|
188 mday 1.19 SafeQueue<AsyncOpNode *> _incomingQueue;
|
189 chip 1.13 //SafeQueue<Message *> _outgoingQueue;
|
190 chip 1.1
|
191 chip 1.11 ProviderRegistrationManager * _providerRegistrationManager;
|
192 mday 1.29 /** Table holding indication response handlers, one for each provider
193 that has indications enabled.
194 */
195
196 IndicationResponseTable _responseTable;
197
|
198 chip 1.1 };
|
199 mday 1.30
|
200 chip 1.1
201 PEGASUS_NAMESPACE_END
202
203 #endif
|