1 mike 1.2 //%///////-*-c++-*-/////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
5 //
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 //
13 // 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 mike 1.2 //==============================================================================
23 //
24 // Author: Mike Brasher (mbrasher@bmc.com)
25 //
26 // Modified By: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
27 // : Mike Day (mdday@us.ibm.com)
28 // : Yi Zhou (yi_zhou@hp.com)
29 // : Carol Ann Krug Graves, Hewlett-Packard Company
30 // (carolann_graves@hp.com)
31 //
32 //
33 //%/////////////////////////////////////////////////////////////////////////////
34
35 #ifndef PegasusDispatcher_Dispatcher_h
36 #define PegasusDispatcher_Dispatcher_h
37
38 #include <Pegasus/Common/Config.h>
39 #include <Pegasus/Common/IPC.h>
40 #include <Pegasus/Common/DQueue.h>
41 #include <Pegasus/Common/Thread.h>
42 #include <Pegasus/Common/MessageQueue.h>
43 mike 1.2 #include <Pegasus/Common/CIMMessage.h>
44 #include <Pegasus/Common/CIMObject.h>
45 #include <Pegasus/Common/OperationContext.h>
|
46 chip 1.7
47 #include <Pegasus/Server/CIMServer.h>
|
48 mike 1.2
|
49 chip 1.7 #include <Pegasus/Repository/CIMRepository.h>
|
50 mike 1.2
|
51 chip 1.9 #include <Pegasus/Server/ServiceCIMOMHandle.h>
|
52 chip 1.8 #include <Pegasus/Server/ConfigurationManager/ConfigurationManagerQueue.h>
|
53 kumpf 1.20 #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
|
54 chip 1.8
|
55 mike 1.2 PEGASUS_NAMESPACE_BEGIN
56
|
57 mday 1.11 class PEGASUS_SERVER_LINKAGE CIMOperationRequestDispatcher : public MessageQueueService
|
58 mike 1.2 {
|
59 chip 1.19 public:
|
60 chip 1.6
|
61 mday 1.18 typedef MessageQueueService Base;
|
62 chip 1.6
|
63 mday 1.18 CIMOperationRequestDispatcher(
|
64 kumpf 1.25 CIMRepository* repository,
65 ProviderRegistrationManager* providerRegistrationManager,
66 CIMServer* server);
|
67 chip 1.6
|
68 mday 1.16 virtual ~CIMOperationRequestDispatcher();
|
69 chip 1.19
|
70 mday 1.18 virtual void handleEnqueue(Message *);
71
|
72 mday 1.13 virtual void handleEnqueue();
|
73 chip 1.6
|
74 mday 1.18 virtual const char* getQueueName() const;
|
75 chip 1.6
|
76 mday 1.18 void handleGetClassRequest(
77 CIMGetClassRequestMessage* request);
|
78 chip 1.6
|
79 mday 1.18 void handleGetInstanceRequest(
80 CIMGetInstanceRequestMessage* request);
|
81 chip 1.6
|
82 mday 1.18 void handleDeleteClassRequest(
83 CIMDeleteClassRequestMessage* request);
|
84 chip 1.6
|
85 mday 1.18 void handleDeleteInstanceRequest(
86 CIMDeleteInstanceRequestMessage* request);
|
87 chip 1.6
|
88 mday 1.18 void handleCreateClassRequest(
89 CIMCreateClassRequestMessage* request);
|
90 chip 1.6
|
91 mday 1.18 void handleCreateInstanceRequest(
92 CIMCreateInstanceRequestMessage* request);
|
93 chip 1.6
|
94 mday 1.18 void handleModifyClassRequest(
95 CIMModifyClassRequestMessage* request);
|
96 mike 1.2
|
97 mday 1.18 void handleModifyInstanceRequest(
98 CIMModifyInstanceRequestMessage* request);
|
99 mike 1.2
|
100 mday 1.18 void handleEnumerateClassesRequest(
101 CIMEnumerateClassesRequestMessage* request);
|
102 mike 1.2
|
103 mday 1.18 void handleEnumerateClassNamesRequest(
104 CIMEnumerateClassNamesRequestMessage* request);
|
105 mike 1.2
|
106 mday 1.18 void handleEnumerateInstancesRequest(
107 CIMEnumerateInstancesRequestMessage* request);
|
108 mike 1.2
|
109 mday 1.18 void handleEnumerateInstanceNamesRequest(
110 CIMEnumerateInstanceNamesRequestMessage* request);
|
111 mike 1.2
|
112 mday 1.18 void handleAssociatorsRequest(
113 CIMAssociatorsRequestMessage* request);
|
114 mike 1.2
|
115 mday 1.18 void handleAssociatorNamesRequest(
116 CIMAssociatorNamesRequestMessage* request);
|
117 mike 1.2
|
118 mday 1.18 void handleReferencesRequest(
119 CIMReferencesRequestMessage* request);
|
120 mike 1.2
|
121 mday 1.18 void handleReferenceNamesRequest(
122 CIMReferenceNamesRequestMessage* request);
|
123 mike 1.2
|
124 mday 1.18 void handleGetPropertyRequest(
125 CIMGetPropertyRequestMessage* request);
|
126 mike 1.2
|
127 mday 1.18 void handleSetPropertyRequest(
128 CIMSetPropertyRequestMessage* request);
|
129 mike 1.2
|
130 mday 1.18 void handleGetQualifierRequest(
131 CIMGetQualifierRequestMessage* request);
|
132 mike 1.2
|
133 mday 1.18 void handleSetQualifierRequest(
134 CIMSetQualifierRequestMessage* request);
|
135 mike 1.2
|
136 mday 1.18 void handleDeleteQualifierRequest(
137 CIMDeleteQualifierRequestMessage* request);
|
138 mike 1.2
|
139 mday 1.18 void handleEnumerateQualifiersRequest(
140 CIMEnumerateQualifiersRequestMessage* request);
|
141 mike 1.2
|
142 mday 1.18 void handleInvokeMethodRequest(
143 CIMInvokeMethodRequestMessage* request);
|
144 mike 1.2
|
145 mday 1.18 void handleEnableIndicationSubscriptionRequest(
146 CIMEnableIndicationSubscriptionRequestMessage* request);
|
147 mike 1.2
|
148 mday 1.18 void handleModifyIndicationSubscriptionRequest(
149 CIMModifyIndicationSubscriptionRequestMessage* request);
|
150 mike 1.2
|
151 mday 1.18 void handleDisableIndicationSubscriptionRequest(
152 CIMDisableIndicationSubscriptionRequestMessage* request);
|
153 mike 1.2
|
154 mday 1.18 void handleProcessIndicationRequest(
155 CIMProcessIndicationRequestMessage* request);
|
156 kumpf 1.10
|
157 kumpf 1.20 ProviderRegistrationManager* getProviderRegistrationManager(void);
158
|
159 chip 1.19 protected:
|
160 kumpf 1.10
|
161 kumpf 1.26 Boolean _lookupInternalProvider(
162 const String& nameSpace,
163 const String& className,
164 String& service,
165 String& provider);
166
|
167 kumpf 1.21 String _lookupInstanceProvider(
168 const String& nameSpace, const String& className);
169
170 String _lookupAssociationProvider(
171 const String& nameSpace, const String& className);
172
173 String _lookupMethodProvider(const String& nameSpace,
174 const String& className, const String& methodName);
175
176 String _lookupIndicationProvider(
177 const String& nameSpace, const String& className);
|
178 chip 1.14
|
179 kumpf 1.27 void _forwardRequestToService(
180 const String& serviceName,
181 CIMRequestMessage* request,
182 CIMResponseMessage*& response);
183
184 void _forwardRequestToControlProvider(
185 const String& serviceName,
186 const String& controlProviderName,
187 CIMRequestMessage* request,
188 CIMResponseMessage*& response);
189
|
190 mday 1.13 void _enqueueResponse(
191 CIMRequestMessage* request, CIMResponseMessage* response);
|
192 chip 1.14
|
193 kumpf 1.17 CIMValue _convertValueType(const CIMValue& value, CIMType type);
194
195 void _fixInvokeMethodParameterTypes(CIMInvokeMethodRequestMessage* request);
196
197 void _fixSetPropertyValueType(CIMSetPropertyRequestMessage* request);
198
|
199 mday 1.13 CIMRepository * _repository;
|
200 chip 1.14
|
201 kumpf 1.25 ProviderRegistrationManager* _providerRegistrationManager;
|
202 chip 1.22
|
203 mday 1.13 ServiceCIMOMHandle _cimom;
|
204 chip 1.14
|
205 mday 1.13 ConfigurationManagerQueue _configurationManager;
|
206 chip 1.14
|
207 mday 1.13 AtomicInt _dying;
|
208 chip 1.14
|
209 mday 1.18 // << Tue Feb 12 08:48:09 2002 mdd >> meta dispatcher integration
|
210 mday 1.13 virtual void _handle_async_request(AsyncRequest *req);
|
211 mday 1.23 private:
212 static void _handle_enqueue_callback(AsyncOpNode *, MessageQueue *, void *);
|
213 chip 1.14
|
214 mike 1.2 };
215
216 PEGASUS_NAMESPACE_END
217
218 #endif /* PegasusDispatcher_Dispatcher_h */
|