(file) Return to BinaryMessageHandler.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Server

  1 karl  1.7 //%2006////////////////////////////////////////////////////////////////////////
  2 mday  1.2 //
  3 karl  1.4 // 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.4 // 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.5 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.7 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 mday  1.2 //
 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           // 
 21           // 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           //%/////////////////////////////////////////////////////////////////////////////
 33 kumpf 1.10 
 34 mday  1.2  #ifndef Pegasus_BinaryMessageHandler_h
 35            #define Pegasus_BinaryMessageHandler_h
 36 kumpf 1.10 
 37 mday  1.2  #include <Pegasus/Common/Config.h>
 38            #include <Pegasus/Common/AsyncOpNode.h>
 39 mike  1.8  #include <Pegasus/Common/AsyncQueue.h>
 40 mday  1.2  #include <Pegasus/Common/MessageQueueService.h>
 41            #include <Pegasus/Common/Message.h>
 42            #include <Pegasus/Common/CIMMessage.h>
 43            #include <Pegasus/Common/Tracer.h>
 44            #include <Pegasus/Common/TraceComponents.h>
 45            #include <Pegasus/Common/Thread.h>
 46            #include <Pegasus/Common/Constants.h>
 47            #include <Pegasus/Server/Linkage.h>
 48            
 49            PEGASUS_NAMESPACE_BEGIN
 50            
 51 kumpf 1.10 /** This class provides an in-process binary client interface,
 52                both for requests and responses.
 53 mday  1.2  */
 54            class PEGASUS_SERVER_LINKAGE BinaryMessageHandler : public MessageQueueService
 55            {
 56 kumpf 1.10 public:
 57                typedef MessageQueueService Base;
 58            
 59                BinaryMessageHandler(MessageQueueService* outputQueue);
 60                ~BinaryMessageHandler();
 61            
 62                virtual Boolean messageOK(const Message* message);
 63                virtual void handleEnqueue();
 64                virtual void handleEnqueue(Message* message);
 65                virtual void _handle_async_request(AsyncRequest* request);
 66            
 67            protected:
 68                static ThreadReturnType PEGASUS_THREAD_CDECL handle_binary_message(void*);
 69            
 70                // **** Request Messages **** //
 71            
 72                void handleCreateClassRequest(
 73                    AsyncOpNode*,
 74                    CIMCreateClassRequestMessage*) throw();
 75            
 76                void handleGetClassRequest(
 77 kumpf 1.10         AsyncOpNode*,
 78                    CIMGetClassRequestMessage*) throw();
 79            
 80                void handleModifyClassRequest(
 81                    AsyncOpNode*,
 82                    CIMModifyClassRequestMessage*) throw();
 83            
 84                void handleEnumerateClassNamesRequest(
 85                    AsyncOpNode*,
 86                    CIMEnumerateClassNamesRequestMessage*) throw();
 87            
 88                void handleEnumerateClassesRequest(
 89                    AsyncOpNode*,
 90                    CIMEnumerateClassesRequestMessage*) throw();
 91            
 92                void handleDeleteClassRequest(
 93                    AsyncOpNode*,
 94                    CIMDeleteClassRequestMessage*) throw();
 95            
 96                void handleCreateInstanceRequest(
 97                    AsyncOpNode*,
 98 kumpf 1.10         CIMCreateInstanceRequestMessage*) throw();
 99            
100                void handleGetInstanceRequest(
101                    AsyncOpNode*,
102                    CIMGetInstanceRequestMessage*) throw();
103            
104                void handleModifyInstanceRequest(
105                    AsyncOpNode*,
106                    CIMModifyInstanceRequestMessage*) throw();
107            
108                void handleEnumerateInstanceNamesRequest(
109                    AsyncOpNode*,
110                    CIMEnumerateInstanceNamesRequestMessage*) throw();
111            
112                void handleEnumerateInstancesRequest(
113                    AsyncOpNode*,
114                    CIMEnumerateInstancesRequestMessage*) throw();
115            
116                void handleDeleteInstanceRequest(
117                    AsyncOpNode*,
118                    CIMDeleteInstanceRequestMessage*) throw();
119 kumpf 1.10 
120                void handleSetQualifierRequest(
121                    AsyncOpNode*,
122                    CIMSetQualifierRequestMessage*) throw();
123            
124                void handleGetQualifierRequest(
125                    AsyncOpNode*,
126                    CIMGetQualifierRequestMessage*) throw();
127            
128                void handleEnumerateQualifiersRequest(
129                    AsyncOpNode*,
130                    CIMEnumerateQualifiersRequestMessage*) throw();
131            
132                void handleDeleteQualifiersRequest(
133                    AsyncOpNode*,
134                    CIMDeleteQualifierRequestMessage*) throw();
135            
136                void handleReferenceNamesRequest(
137                    AsyncOpNode*,
138                    CIMReferenceNamesRequestMessage*) throw();
139            
140 kumpf 1.10     void handleReferencesRequest(
141                    AsyncOpNode*,
142                    CIMReferencesRequestMessage*) throw();
143            
144                void handleAssociatorNamesRequest(
145                    AsyncOpNode*,
146                    CIMAssociatorNamesRequestMessage*) throw();
147            
148                void handleAssociatorsRequest(
149                    AsyncOpNode*,
150                    CIMAssociatorsRequestMessage*) throw();
151            
152                void handleGetPropertyRequest(
153                    AsyncOpNode*,
154                    CIMGetPropertyRequestMessage*) throw();
155            
156                void handleSetPropertyRequest(
157                    AsyncOpNode*,
158                    CIMSetPropertyRequestMessage*) throw();
159            
160                void handleExecQueryRequest(
161 kumpf 1.10         AsyncOpNode*,
162                    CIMExecQueryRequestMessage*) throw();
163 mday  1.2  
164 kumpf 1.10     void handleInvokeMethodRequest(
165                    AsyncOpNode*,
166                    CIMInvokeMethodRequestMessage*) throw();
167            
168                // **** Response Messages **** //
169            
170                void handleCreateClassResponse(
171                    AsyncOpNode*,
172                    CIMCreateClassResponseMessage*) throw();
173            
174                void handleGetClassResponse(
175                    AsyncOpNode*,
176                    CIMGetClassResponseMessage*) throw();
177            
178                void handleModifyClassResponse(
179                    AsyncOpNode*,
180                    CIMModifyClassResponseMessage*) throw();
181            
182                void handleEnumerateClassNamesResponse(
183                    AsyncOpNode*,
184                    CIMEnumerateClassNamesResponseMessage*) throw();
185 kumpf 1.10 
186                void handleEnumerateClassesResponse(
187                    AsyncOpNode*,
188                    CIMEnumerateClassesResponseMessage*) throw();
189            
190                void handleDeleteClassResponse(
191                    AsyncOpNode*,
192                    CIMDeleteClassResponseMessage*) throw();
193            
194                void handleCreateInstanceResponse(
195                    AsyncOpNode*,
196                    CIMCreateInstanceResponseMessage*) throw();
197            
198                void handleGetInstanceResponse(
199                    AsyncOpNode*,
200                    CIMGetInstanceResponseMessage*) throw();
201            
202                void handleModifyInstanceResponse(
203                    AsyncOpNode*,
204                    CIMModifyInstanceResponseMessage*) throw();
205            
206 kumpf 1.10     void handleEnumerateInstanceNamesResponse(
207                    AsyncOpNode*,
208                    CIMEnumerateInstanceNamesResponseMessage*) throw();
209            
210                void handleEnumerateInstancesResponse(
211                    AsyncOpNode*,
212                    CIMEnumerateInstancesResponseMessage*) throw();
213            
214                void handleDeleteInstanceResponse(
215                    AsyncOpNode*,
216                    CIMDeleteInstanceResponseMessage*) throw();
217            
218                void handleGetPropertyResponse(
219                    AsyncOpNode*,
220                    CIMGetPropertyResponseMessage*) throw();
221            
222                void handleSetPropertyResponse(
223                    AsyncOpNode*,
224                    CIMSetPropertyResponseMessage*) throw();
225            
226                void handleSetQualifierResponse(
227 kumpf 1.10         AsyncOpNode*,
228                    CIMSetQualifierResponseMessage*) throw();
229            
230                void handleGetQualifierResponse(
231                    AsyncOpNode*,
232                    CIMGetQualifierResponseMessage*) throw();
233            
234                void handleEnumerateQualifiersResponse(
235                    AsyncOpNode*,
236                    CIMEnumerateQualifiersResponseMessage*) throw();
237            
238                void handleDeleteQualifierResponse(
239                    AsyncOpNode*,
240                    CIMDeleteQualifierResponseMessage*) throw();
241            
242                void handleReferenceNamesResponse(
243                    AsyncOpNode*,
244                    CIMReferenceNamesResponseMessage*) throw();
245            
246                void handleReferencesResponse(
247                    AsyncOpNode*,
248 kumpf 1.10         CIMReferencesResponseMessage*) throw();
249            
250                void handleAssociatorNamesResponse(
251                    AsyncOpNode*,
252                    CIMAssociatorNamesResponseMessage*) throw();
253            
254                void handleAssociatorsResponse(
255                    AsyncOpNode*,
256                    CIMAssociatorsResponseMessage*) throw();
257            
258                void handleExecQueryResponse(
259                    AsyncOpNode*,
260                    CIMExecQueryResponseMessage*) throw();
261            
262                void handleInvokeMethodResponse(
263                    AsyncOpNode*,
264                    CIMInvokeMethodResponseMessage*) throw();
265            
266            private:
267                BinaryMessageHandler();
268                BinaryMessageHandler& operator=(const BinaryMessageHandler&) const;
269 kumpf 1.10     void _handleRequest(AsyncOpNode*, Message*) throw();
270                void _handleResponse(AsyncOpNode*, Message*) throw();
271            
272                MessageQueueService* _outputQueue;
273            
274                // Flag to indicate whether or not the CIMServer is shutting down.
275                AsyncQueue<AsyncOpNode> _msg_q;
276 mday  1.2  };
277            
278            PEGASUS_NAMESPACE_END
279            
280            #endif // Pegasus_BinaryMessageHandler_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2