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

  1 karl  1.17 //%2005////////////////////////////////////////////////////////////////////////
  2 schuur 1.1  //
  3 karl   1.8  // 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 schuur 1.1  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl   1.8  // 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.17 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10             // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 schuur 1.1  //
 12             // Permission is hereby granted, free of charge, to any person obtaining a copy
 13             // of this software and associated documentation files (the "Software"), to
 14             // deal in the Software without restriction, including without limitation the
 15             // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16             // sell copies of the Software, and to permit persons to whom the Software is
 17             // furnished to do so, subject to the following conditions:
 18 chip   1.18 //
 19 schuur 1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20             // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21             // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22             // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23             // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24             // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25             // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26             // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27             //
 28             //==============================================================================
 29             //
 30             // Author: Chip Vincent (cvincent@us.ibm.com)
 31             //
 32 chip   1.11 // Modified By:
 33             //      Carol Ann Krug Graves, Hewlett-Packard Company (carolann_graves@hp.com)
 34             //      Dave Rosckes (rosckes@us.ibm.com)
 35             //      Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
 36             //      Adrian Schuur (schuur@de.ibm.com)
 37             //      Seema Gupta (gseema@in.ibm.com) for PEP135
 38             //      Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase2
 39 schuur 1.1  //
 40             //%/////////////////////////////////////////////////////////////////////////////
 41             
 42             #ifndef Pegasus_OperationResponseHandler_h
 43             #define Pegasus_OperationResponseHandler_h
 44             
 45             #include <Pegasus/Common/Config.h>
 46             #include <Pegasus/Common/CIMMessage.h>
 47             #include <Pegasus/Common/MessageQueueService.h>
 48             #include <Pegasus/Common/Constants.h>
 49             
 50             #include <Pegasus/Common/CIMClass.h>
 51             #include <Pegasus/Common/CIMInstance.h>
 52             #include <Pegasus/Common/CIMIndication.h>
 53             #include <Pegasus/Common/CIMValue.h>
 54             
 55 chip   1.14 #include <Pegasus/Common/OperationContext.h>
 56             #include <Pegasus/Common/OperationContextInternal.h>
 57             
 58             #include <Pegasus/Common/ObjectNormalizer.h>
 59 chip   1.25 
 60 schuur 1.1  #include <Pegasus/Common/ResponseHandler.h>
 61 chip   1.25 #include <Pegasus/ProviderManager2/SimpleResponseHandler.h>
 62 schuur 1.1  
 63             #include <Pegasus/ProviderManager2/Linkage.h>
 64             
 65             PEGASUS_NAMESPACE_BEGIN
 66             
 67             class PEGASUS_PPM_LINKAGE OperationResponseHandler
 68             {
 69 chip   1.11     friend class SimpleResponseHandler;
 70 brian.campbell 1.9  
 71 schuur         1.1  public:
 72 chip           1.11     OperationResponseHandler(
 73                             CIMRequestMessage * request,
 74                             CIMResponseMessage * response);
 75 schuur         1.1  
 76 brian.campbell 1.9      virtual ~OperationResponseHandler(void);
 77 chip           1.11 
 78 chip           1.25     CIMRequestMessage * getRequest(void) const;
 79                     
 80                         CIMResponseMessage * getResponse(void) const;
 81 schuur         1.1  
 82 chip           1.11     virtual void setStatus(
 83                             const Uint32 code,
 84 chip           1.25         const String & message = String::EMPTY);
 85 schuur         1.1  
 86 chip           1.11     virtual void setStatus(
 87                             const Uint32 code,
 88                             const ContentLanguages & langs,
 89 chip           1.25         const String & message = String::EMPTY);
 90 schuur         1.1  
 91                     protected:
 92 chip           1.11     // the default for all derived handlers. Some handlers may not apply
 93                         // async behavior because their callers cannot handle partial responses.
 94 chip           1.25     virtual Boolean isAsync(void) const;
 95 brian.campbell 1.9  
 96 chip           1.11     // send (deliver) asynchronously
 97                         virtual void send(Boolean isComplete);
 98 brian.campbell 1.9  
 99 chip           1.11     // transfer any objects from handler to response. this does not clear()
100 chip           1.25     virtual void transfer(void);
101 brian.campbell 1.9  
102 chip           1.11     // validate whatever is necessary before the transfer
103 chip           1.25     virtual void validate(void);
104                     
105                         virtual String getClass(void) const;
106                     
107                         Uint32 getResponseObjectTotal(void) const;
108 brian.campbell 1.9  
109 chip           1.11     // there can be many objects per message (or none at all - i.e complete())
110 chip           1.25     Uint32 getResponseMessageTotal(void) const;
111                     
112                         Uint32 getResponseObjectThreshold(void) const;
113 brian.campbell 1.9  
114 schuur         1.1      CIMRequestMessage * _request;
115                         CIMResponseMessage * _response;
116                     
117 brian.campbell 1.9  private:
118 chip           1.11     Uint32 _responseObjectTotal;
119                         Uint32 _responseMessageTotal;
120                         Uint32 _responseObjectThreshold;
121                     
122 schuur         1.1  };
123                     
124 chip           1.26 class PEGASUS_PPM_LINKAGE GetInstanceResponseHandler : public OperationResponseHandler, public SimpleInstanceResponseHandler
125 chip           1.11 {
126                     public:
127                         GetInstanceResponseHandler(
128                             CIMGetInstanceRequestMessage * request,
129 chip           1.25         CIMGetInstanceResponseMessage * response);
130                     
131                         virtual void deliver(const CIMInstance & cimInstance);
132 chip           1.26     virtual void complete(void);
133 chip           1.25 
134                     protected:
135                         virtual String getClass(void) const;
136                     
137                         virtual void transfer(void);
138                     
139                         virtual void validate(void);
140 chip           1.14 
141                     private:
142                         ObjectNormalizer _normalizer;
143                     
144 schuur         1.1  };
145                     
146 chip           1.26 class PEGASUS_PPM_LINKAGE EnumerateInstancesResponseHandler : public OperationResponseHandler, public SimpleInstanceResponseHandler
147 schuur         1.1  {
148                     public:
149 chip           1.11     EnumerateInstancesResponseHandler(
150                             CIMEnumerateInstancesRequestMessage * request,
151 chip           1.25         CIMEnumerateInstancesResponseMessage * response);
152                     
153                         virtual void deliver(const CIMInstance & cimInstance);
154 chip           1.11 
155 chip           1.25 protected:
156                         virtual String getClass(void) const;
157                     
158                         virtual void transfer(void);
159 chip           1.14 
160                     private:
161                         ObjectNormalizer _normalizer;
162                     
163 schuur         1.1  };
164                     
165 chip           1.26 class PEGASUS_PPM_LINKAGE EnumerateInstanceNamesResponseHandler : public OperationResponseHandler, public SimpleObjectPathResponseHandler
166 schuur         1.1  {
167                     public:
168 chip           1.11     EnumerateInstanceNamesResponseHandler(
169                             CIMEnumerateInstanceNamesRequestMessage * request,
170 chip           1.25         CIMEnumerateInstanceNamesResponseMessage * response);
171 chip           1.11 
172 chip           1.25     virtual void deliver(const CIMObjectPath & cimObjectPath);
173                     
174                     protected:
175                         virtual String getClass(void) const;
176                     
177                         virtual void transfer(void);
178 chip           1.14 
179                     private:
180                         ObjectNormalizer _normalizer;
181                     
182 schuur         1.1  };
183                     
184 chip           1.26 class PEGASUS_PPM_LINKAGE CreateInstanceResponseHandler : public OperationResponseHandler, public SimpleObjectPathResponseHandler
185 schuur         1.1  {
186                     public:
187 chip           1.11     CreateInstanceResponseHandler(
188                             CIMCreateInstanceRequestMessage * request,
189 chip           1.25         CIMCreateInstanceResponseMessage * response);
190                     
191                         virtual void deliver(const CIMObjectPath & cimObjectPath);
192 chip           1.26     virtual void complete(void);
193 chip           1.25 
194                     protected:
195                         virtual String getClass(void) const;
196                     
197                         virtual void transfer(void);
198                     
199 schuur         1.1  };
200                     
201 chip           1.26 class PEGASUS_PPM_LINKAGE ModifyInstanceResponseHandler : public OperationResponseHandler, public SimpleResponseHandler
202 schuur         1.1  {
203                     public:
204 chip           1.11     ModifyInstanceResponseHandler(
205                             CIMModifyInstanceRequestMessage * request,
206 chip           1.25         CIMModifyInstanceResponseMessage * response);
207 chip           1.11 
208 chip           1.18 protected:
209 chip           1.25     virtual String getClass(void) const;
210                     
211 schuur         1.1  };
212                     
213 chip           1.26 class PEGASUS_PPM_LINKAGE DeleteInstanceResponseHandler : public OperationResponseHandler, public SimpleResponseHandler
214 schuur         1.1  {
215                     public:
216 chip           1.11     DeleteInstanceResponseHandler(
217                             CIMDeleteInstanceRequestMessage * request,
218 chip           1.25         CIMDeleteInstanceResponseMessage * response);
219 chip           1.11 
220 chip           1.18 protected:
221 chip           1.25     virtual String getClass(void) const;
222 chip           1.11 
223 schuur         1.1  };
224                     
225 chip           1.26 class PEGASUS_PPM_LINKAGE GetPropertyResponseHandler : public OperationResponseHandler, public SimpleValueResponseHandler
226 schuur         1.1  {
227                     public:
228 chip           1.11     GetPropertyResponseHandler(
229                             CIMGetPropertyRequestMessage * request,
230 chip           1.25         CIMGetPropertyResponseMessage * response);
231                     
232                         virtual void deliver(const CIMValue & cimValue);
233                     
234                     protected:
235                         virtual String getClass(void) const;
236                     
237                         virtual void transfer(void);
238                     
239                         virtual void validate(void);
240                     
241 schuur         1.1  };
242                     
243 chip           1.26 class PEGASUS_PPM_LINKAGE SetPropertyResponseHandler : public OperationResponseHandler, public SimpleResponseHandler
244 schuur         1.1  {
245                     public:
246 chip           1.11     SetPropertyResponseHandler(
247                             CIMSetPropertyRequestMessage * request,
248 chip           1.25         CIMSetPropertyResponseMessage * response);
249 chip           1.11 
250 chip           1.18 protected:
251 chip           1.25     virtual String getClass(void) const;
252 chip           1.11 
253 schuur         1.1  };
254                     
255 chip           1.26 class PEGASUS_PPM_LINKAGE ExecQueryResponseHandler : public OperationResponseHandler, public SimpleInstance2ObjectResponseHandler
256 schuur         1.1  {
257                     public:
258 chip           1.11     ExecQueryResponseHandler(
259                             CIMExecQueryRequestMessage * request,
260 chip           1.25         CIMExecQueryResponseMessage * response);
261                     
262                         virtual void deliver(const CIMInstance & cimInstance);
263                     
264                     protected:
265                         virtual String getClass(void) const;
266                     
267                         virtual void transfer(void);
268                     
269                         virtual Boolean isAsync(void) const;
270                     
271 schuur         1.1  };
272                     
273 chip           1.26 class PEGASUS_PPM_LINKAGE AssociatorsResponseHandler : public OperationResponseHandler, public SimpleObjectResponseHandler
274 schuur         1.1  {
275                     public:
276 chip           1.11     AssociatorsResponseHandler(
277                             CIMAssociatorsRequestMessage * request,
278 chip           1.25         CIMAssociatorsResponseMessage * response);
279                     
280                         virtual void deliver(const CIMObject & cimObject);
281                     
282                     protected:
283                         virtual String getClass(void) const;
284                     
285                         virtual void transfer(void);
286 chip           1.11 
287 schuur         1.1  };
288                     
289 chip           1.26 class PEGASUS_PPM_LINKAGE AssociatorNamesResponseHandler : public OperationResponseHandler, public SimpleObjectPathResponseHandler
290 schuur         1.1  {
291                     public:
292 chip           1.11     AssociatorNamesResponseHandler(
293                             CIMAssociatorNamesRequestMessage * request,
294 chip           1.25         CIMAssociatorNamesResponseMessage * response);
295                     
296                         virtual void deliver(const CIMObjectPath & cimObjectPath);
297                     
298                     protected:
299                         virtual String getClass(void) const;
300                     
301                         virtual void transfer(void);
302 chip           1.11 
303 schuur         1.1  };
304                     
305 chip           1.26 class PEGASUS_PPM_LINKAGE ReferencesResponseHandler : public OperationResponseHandler, public SimpleObjectResponseHandler
306 schuur         1.1  {
307                     public:
308 chip           1.11     ReferencesResponseHandler(
309                             CIMReferencesRequestMessage * request,
310 chip           1.25         CIMReferencesResponseMessage * response);
311                     
312                         virtual void deliver(const CIMObject & cimObject);
313                     
314                     protected:
315                         virtual String getClass(void) const;
316                     
317                         virtual void transfer(void);
318 chip           1.11 
319 schuur         1.1  };
320                     
321 chip           1.26 class PEGASUS_PPM_LINKAGE ReferenceNamesResponseHandler : public OperationResponseHandler, public SimpleObjectPathResponseHandler
322 schuur         1.1  {
323                     public:
324 chip           1.11     ReferenceNamesResponseHandler(
325                             CIMReferenceNamesRequestMessage * request,
326 chip           1.25         CIMReferenceNamesResponseMessage * response);
327                     
328                         virtual void deliver(const CIMObjectPath & cimObjectPath);
329                     
330                     protected:
331                         virtual String getClass(void) const;
332                     
333                         virtual void transfer(void);
334 chip           1.11 
335 schuur         1.1  };
336                     
337 chip           1.26 class PEGASUS_PPM_LINKAGE InvokeMethodResponseHandler : public OperationResponseHandler, public SimpleMethodResultResponseHandler
338 schuur         1.1  {
339                     public:
340 chip           1.11     InvokeMethodResponseHandler(
341                             CIMInvokeMethodRequestMessage * request,
342 chip           1.25         CIMInvokeMethodResponseMessage * response);
343                     
344                         virtual void deliverParamValue(const CIMParamValue & cimParamValue);
345                     
346                         virtual void deliver(const CIMValue & cimValue);
347                     
348                     protected:
349                         virtual String getClass(void) const;
350                     
351                         virtual void transfer(void);
352                     
353 schuur         1.1  };
354                     
355 brian.campbell 1.9  typedef void (*PEGASUS_INDICATION_CALLBACK)(CIMProcessIndicationRequestMessage*);
356 kumpf          1.2  
357 chip           1.26 class PEGASUS_PPM_LINKAGE EnableIndicationsResponseHandler : public OperationResponseHandler, public SimpleIndicationResponseHandler
358 schuur         1.1  {
359                     public:
360 chip           1.11     EnableIndicationsResponseHandler(
361 carolann.graves 1.19         CIMRequestMessage * request,
362                              CIMResponseMessage * response,
363 chip            1.11         CIMInstance & provider,
364 chip            1.25         PEGASUS_INDICATION_CALLBACK indicationCallback);
365                      
366                          virtual void deliver(const CIMIndication & cimIndication);
367                      
368                          virtual void deliver(const OperationContext & context, const CIMIndication & cimIndication);
369                      
370                          virtual void deliver(const Array<CIMIndication> & cimIndications);
371                      
372                          virtual void deliver(const OperationContext & context, const Array<CIMIndication> & cimIndications);
373                      
374                      protected:
375                          virtual String getClass(void) const;
376                      
377                          virtual Boolean isAsync(void) const;
378 chip            1.18 
379 brian.campbell  1.9  private:
380 chip            1.11     PEGASUS_INDICATION_CALLBACK _indicationCallback;
381 schuur          1.1  
382 brian.campbell  1.9  };
383 schuur          1.1  
384                      PEGASUS_NAMESPACE_END
385                      
386                      #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2