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

  1 martin 1.31 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.32 //
  3 martin 1.31 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.32 //
 10 martin 1.31 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.32 //
 17 martin 1.31 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.32 //
 20 martin 1.31 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.32 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.31 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.32 //
 28 martin 1.31 //////////////////////////////////////////////////////////////////////////
 29 mike   1.2  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #ifndef Pegasus_ResponseHandler_h
 33             #define Pegasus_ResponseHandler_h
 34             
 35             #include <Pegasus/Common/Config.h>
 36             #include <Pegasus/Common/Array.h>
 37 kumpf  1.6  #include <Pegasus/Common/Linkage.h>
 38 kumpf  1.4  
 39             #include <Pegasus/Common/CIMInstance.h>
 40             #include <Pegasus/Common/CIMObjectPath.h>
 41             #include <Pegasus/Common/CIMParamValue.h>
 42             #include <Pegasus/Common/CIMValue.h>
 43             #include <Pegasus/Common/CIMIndication.h>
 44             #include <Pegasus/Common/CIMObject.h>
 45             #include <Pegasus/Common/CIMClass.h>
 46 kumpf  1.8  #include <Pegasus/Common/OperationContext.h>
 47 chuck  1.11 
 48 r.kieninger 1.32.4.1 
 49 chuck       1.12     PEGASUS_NAMESPACE_BEGIN
 50 kumpf       1.10     
 51 kumpf       1.4      /**
 52 kumpf       1.26         The ResponseHandler class allows a provider to report operation
 53                          progress and results to the CIM Server.  Subclasses are defined
 54                          for each type of result data.
 55 kumpf       1.4      */
 56 kumpf       1.5      class PEGASUS_COMMON_LINKAGE ResponseHandler
 57 kumpf       1.4      {
 58                      public:
 59                      
 60                          /**
 61 kumpf       1.26             Destructs the ResponseHandler.
 62 kumpf       1.4          */
 63 kumpf       1.26         virtual ~ResponseHandler();
 64 kumpf       1.4      
 65 kumpf       1.26         // This method is defined in subclasses, specialized for
 66 kumpf       1.10         // the appropriate data type.
 67 kumpf       1.4          //virtual void deliver(const T & object);
 68                      
 69 kumpf       1.26         // This method is defined in subclasses, specialized for
 70 kumpf       1.10         // the appropriate data type.
 71 kumpf       1.4          //virtual void deliver(const Array<T> & objects);
 72                      
 73                          /**
 74 kumpf       1.26             Informs the CIM Server that delivery of results will begin.
 75                              This method must be called before deliver() is called.
 76 kumpf       1.4          */
 77 kumpf       1.26         virtual void processing() = 0;
 78 chuck       1.11     
 79 kumpf       1.4          /**
 80 kumpf       1.26             Informs the CIM Server that delivery of results is complete.
 81                              This method must be called when all the results have been delivered.
 82                              The deliver() method must not be called after this method is called.
 83 kumpf       1.4          */
 84 kumpf       1.26         virtual void complete() = 0;
 85 chuck       1.12     
 86 kumpf       1.28         /**
 87 kumpf       1.26             Sets the context for operation responses delivered to the CIM Server.
 88                              This method allows a provider to communicate context information
 89                              (such as content language) along with an operation response.  The
 90                              context information applies to all the operation response data
 91                              delivered to this ResponseHandler object.  The context information
 92                              is applied at the time the complete() method is called.
 93 chuck       1.12         */
 94                          void setContext(const OperationContext & context);
 95                      
 96                      protected:
 97 kumpf       1.26     
 98 kumpf       1.30         /**
 99                              The default constructor is not available for the ResponseHandler class.
100                          */
101 chuck       1.12         ResponseHandler();
102                      
103 kumpf       1.30         /**
104                              The copy constructor is not available for the ResponseHandler class.
105                          */
106 kumpf       1.13         ResponseHandler(const ResponseHandler& handler);
107                      
108 kumpf       1.30         /**
109                              The assignment operator is not available for the ResponseHandler class.
110                          */
111 kumpf       1.13         ResponseHandler& operator=(const ResponseHandler& handler);
112                      
113 karl        1.18         /**
114 kumpf       1.26             Gets the context for the results delivered to the CIM Server.
115 karl        1.18         */
116 kumpf       1.26         OperationContext getContext() const;
117 kumpf       1.4      };
118                      
119 r.kieninger 1.32.4.1 class SCMOInstance;
120 kumpf       1.4      
121 karl        1.18     /**
122 kumpf       1.26         The InstanceResponseHandler class is a subclass of the ResponseHandler
123                          class which allows delivery of instance results.
124 karl        1.18     */
125 kumpf       1.26     class PEGASUS_COMMON_LINKAGE InstanceResponseHandler
126                          : virtual public ResponseHandler
127 kumpf       1.4      {
128                      public:
129 kumpf       1.26         /**
130                              Delivers an instance result to the CIM Server.  This method may
131                              be called multiple times when more than one result needs to be
132                              delivered.  An Array form of this method is also available to
133                              deliver multiple results.
134                              @param instance The instance to deliver to the CIM Server.
135 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
136                              not consistent with the corresponding request or associated schema.
137 kumpf       1.10         */
138 kumpf       1.4          virtual void deliver(const CIMInstance & instance) = 0;
139 r.kieninger 1.32.4.1     virtual void deliver(const SCMOInstance & instance) = 0;
140 kumpf       1.4      
141 kumpf       1.26         /**
142                              Delivers multiple instance results to the CIM Server.  This method
143                              may be invoked multiple times, if necessary.
144                              @param instances The instances to deliver to the CIM Server.
145 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
146                              not consistent with the corresponding request or associated schema.
147 kumpf       1.10         */
148 kumpf       1.4          virtual void deliver(const Array<CIMInstance> & instances) = 0;
149                      };
150                      
151                      
152 kumpf       1.26     /**
153                          The ObjectPathResponseHandler class is a subclass of the ResponseHandler
154                          class which allows delivery of object path results.
155                      */
156                      class PEGASUS_COMMON_LINKAGE ObjectPathResponseHandler
157                          : virtual public ResponseHandler
158 kumpf       1.4      {
159                      public:
160 kumpf       1.26         /**
161                              Delivers an object path result to the CIM Server.  This method may
162                              be called multiple times when more than one result needs to be
163                              delivered.  An Array form of this method is also available to
164                              deliver multiple results.
165                              @param objectPath The object path to deliver to the CIM Server.
166 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
167                              not consistent with the corresponding request or associated schema.
168 kumpf       1.10         */
169 kumpf       1.4          virtual void deliver(const CIMObjectPath & objectPath) = 0;
170 r.kieninger 1.32.4.1     virtual void deliver(const SCMOInstance & instance) = 0;
171 kumpf       1.4      
172 kumpf       1.26         /**
173                              Delivers multiple object path results to the CIM Server.  This method
174                              may be invoked multiple times, if necessary.
175                              @param objectPaths The object paths to deliver to the CIM Server.
176 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
177                              not consistent with the corresponding request or associated schema.
178 kumpf       1.10         */
179 kumpf       1.4          virtual void deliver(const Array<CIMObjectPath> & objectPaths) = 0;
180                      };
181                      
182                      
183 karl        1.18     /**
184 kumpf       1.26         The MethodResultResponseHandler class is a subclass of the ResponseHandler
185                          class which allows delivery of extrinsic method results.
186 karl        1.18     */
187 kumpf       1.26     class PEGASUS_COMMON_LINKAGE MethodResultResponseHandler
188                          : virtual public ResponseHandler
189 kumpf       1.4      {
190                      public:
191 karl        1.18         /**
192 kumpf       1.26             Delivers extrinsic method output parameters to the CIM Server.
193                              This method may be called multiple times when more than one result
194                              needs to be delivered.  An Array form of this method is also
195                              available to deliver multiple results.
196                              @param outParamValue The output parameter to deliver to the CIM Server.
197 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
198                              not consistent with the corresponding request or associated schema.
199 kumpf       1.26         */
200 kumpf       1.4          virtual void deliverParamValue(const CIMParamValue & outParamValue) = 0;
201                      
202 karl        1.18         /**
203 kumpf       1.26             Delivers a set of output parameters to the CIM Server.  This method
204                              may be invoked multiple times, if necessary.
205                              @param outParamValues An Array of method output parameters to deliver
206                              to the CIM Server.
207 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
208                              not consistent with the corresponding request or associated schema.
209 kumpf       1.26         */
210                          virtual void deliverParamValue(
211                              const Array<CIMParamValue> & outParamValues) = 0;
212 kumpf       1.4      
213 karl        1.18         /**
214 kumpf       1.26             Delivers an extrinsic method return value to the CIM Server.
215                              @param returnValue The return value to deliver to the CIM Server.
216 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
217                              not consistent with the corresponding request or associated schema.
218 kumpf       1.26         */
219 kumpf       1.4          virtual void deliver(const CIMValue & returnValue) = 0;
220                      };
221                      
222                      
223 karl        1.18     /**
224 kumpf       1.26         The IndicationResponseHandler class is a subclass of the ResponseHandler
225                          class which allows delivery of generated indications.
226 karl        1.18     */
227 kumpf       1.26     class PEGASUS_COMMON_LINKAGE IndicationResponseHandler
228                          : virtual public ResponseHandler
229 kumpf       1.4      {
230                      public:
231 karl        1.18         /**
232 kumpf       1.26             Delivers an indication to the CIM Server.  An Array form of this
233                              method is available to deliver multiple indications at once.
234                              Another form is also available to specify the context for the
235                              delivery.
236                              @param indication The indication instance to deliver to the CIM Server.
237 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
238                              not consistent with the corresponding request or associated schema.
239 kumpf       1.26         */
240 kumpf       1.4          virtual void deliver(const CIMIndication & indication) = 0;
241                      
242 kumpf       1.26         /**
243                              Delivers multiple indications to the CIM Server.  Another form of
244                              this method is available to specify the context for the delivery.
245                              @param indications An Array of indication instances to deliver to the
246                              CIM Server.
247 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
248                              not consistent with the corresponding request or associated schema.
249 kumpf       1.26         */
250 kumpf       1.4          virtual void deliver(const Array<CIMIndication> & indications) = 0;
251 kumpf       1.8      
252 kumpf       1.26         /**
253                              Delivers an indication to the CIM Server with a specified context.
254                              An Array form of this method is available to deliver multiple
255                              indications at once.  The context may include data to be associated
256                              with the indication, such as the content language.
257                              @param context A context associated with the indication delivery.
258                              @param indication The indication instance to deliver to the CIM Server.
259 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
260                              not consistent with the corresponding request or associated schema.
261 kumpf       1.26         */
262 kumpf       1.8          virtual void deliver(
263                              const OperationContext & context,
264                              const CIMIndication & indication) = 0;
265                      
266 kumpf       1.26         /**
267                              Delivers multiple indications to the CIM Server with a specified
268                              context.  The context may include data to be associated with the
269                              indications, such as the content language.
270                              @param context A context associated with the indication delivery.
271                              @param indications An Array of indication instances to deliver to the
272                              CIM Server.
273 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
274                              not consistent with the corresponding request or associated schema.
275 kumpf       1.26         */
276 kumpf       1.8          virtual void deliver(
277                              const OperationContext & context,
278                              const Array<CIMIndication> & indications) = 0;
279 kumpf       1.4      };
280                      
281                      
282 kumpf       1.26     /**
283                          The ObjectResponseHandler class is a subclass of the ResponseHandler
284                          class which allows delivery of object results.
285                      */
286                      class PEGASUS_COMMON_LINKAGE ObjectResponseHandler
287                          : virtual public ResponseHandler
288                      {
289                      public:
290                          /**
291                              Delivers an object result to the CIM Server.  This method may
292                              be called multiple times when more than one result needs to be
293                              delivered.  An Array form of this method is also available to
294                              deliver multiple results.
295                              @param object The object to deliver to the CIM Server.
296 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
297                              not consistent with the corresponding request or associated schema.
298 kumpf       1.10         */
299 kumpf       1.4          virtual void deliver(const CIMObject & object) = 0;
300 r.kieninger 1.32.4.2     virtual void deliver(const SCMOInstance & instance) = 0;
301 kumpf       1.4      
302 kumpf       1.26         /**
303                              Delivers multiple object results to the CIM Server.  This method
304                              may be invoked multiple times, if necessary.
305                              @param objects The objects to deliver to the CIM Server.
306 kumpf       1.27             @exception Exception May be thrown if the data that is delivered is
307                              not consistent with the corresponding request or associated schema.
308 kumpf       1.10         */
309 kumpf       1.4          virtual void deliver(const Array<CIMObject> & objects) = 0;
310                      };
311                      
312 mike        1.2      PEGASUS_NAMESPACE_END
313                      
314                      #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2