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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2