(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 chuck  1.12 PEGASUS_NAMESPACE_BEGIN
 49 kumpf  1.10 
 50 kumpf  1.4  /**
 51 kumpf  1.26     The ResponseHandler class allows a provider to report operation
 52                 progress and results to the CIM Server.  Subclasses are defined
 53                 for each type of result data.
 54 kumpf  1.4  */
 55 kumpf  1.5  class PEGASUS_COMMON_LINKAGE ResponseHandler
 56 kumpf  1.4  {
 57             public:
 58             
 59                 /**
 60 kumpf  1.26         Destructs the ResponseHandler.
 61 kumpf  1.4      */
 62 kumpf  1.26     virtual ~ResponseHandler();
 63 kumpf  1.4  
 64 kumpf  1.26     // This method is defined in subclasses, specialized for
 65 kumpf  1.10     // the appropriate data type.
 66 kumpf  1.4      //virtual void deliver(const T & object);
 67             
 68 kumpf  1.26     // This method is defined in subclasses, specialized for
 69 kumpf  1.10     // the appropriate data type.
 70 kumpf  1.4      //virtual void deliver(const Array<T> & objects);
 71             
 72                 /**
 73 kumpf  1.26         Informs the CIM Server that delivery of results will begin.
 74                     This method must be called before deliver() is called.
 75 kumpf  1.4      */
 76 kumpf  1.26     virtual void processing() = 0;
 77 chuck  1.11 
 78 kumpf  1.4      /**
 79 kumpf  1.26         Informs the CIM Server that delivery of results is complete.
 80                     This method must be called when all the results have been delivered.
 81                     The deliver() method must not be called after this method is called.
 82 kumpf  1.4      */
 83 kumpf  1.26     virtual void complete() = 0;
 84 chuck  1.12 
 85 kumpf  1.28     /**
 86 kumpf  1.26         Sets the context for operation responses delivered to the CIM Server.
 87                     This method allows a provider to communicate context information
 88                     (such as content language) along with an operation response.  The
 89                     context information applies to all the operation response data
 90                     delivered to this ResponseHandler object.  The context information
 91                     is applied at the time the complete() method is called.
 92 chuck  1.12     */
 93                 void setContext(const OperationContext & context);
 94             
 95             protected:
 96 kumpf  1.26 
 97 kumpf  1.30     /**
 98                     The default constructor is not available for the ResponseHandler class.
 99                 */
100 chuck  1.12     ResponseHandler();
101             
102 kumpf  1.30     /**
103                     The copy constructor is not available for the ResponseHandler class.
104                 */
105 kumpf  1.13     ResponseHandler(const ResponseHandler& handler);
106             
107 kumpf  1.30     /**
108                     The assignment operator is not available for the ResponseHandler class.
109                 */
110 kumpf  1.13     ResponseHandler& operator=(const ResponseHandler& handler);
111             
112 karl   1.18     /**
113 kumpf  1.26         Gets the context for the results delivered to the CIM Server.
114 karl   1.18     */
115 kumpf  1.26     OperationContext getContext() const;
116 kumpf  1.4  };
117             
118 thilo.boehm 1.33 class SCMOInstance;
119 kumpf       1.4  
120 karl        1.18 /**
121 kumpf       1.26     The InstanceResponseHandler class is a subclass of the ResponseHandler
122                      class which allows delivery of instance results.
123 karl        1.18 */
124 kumpf       1.26 class PEGASUS_COMMON_LINKAGE InstanceResponseHandler
125                      : virtual public ResponseHandler
126 kumpf       1.4  {
127                  public:
128 kumpf       1.26     /**
129                          Delivers an instance result to the CIM Server.  This method may
130                          be called multiple times when more than one result needs to be
131                          delivered.  An Array form of this method is also available to
132                          deliver multiple results.
133                          @param instance The instance to deliver to the CIM Server.
134 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
135                          not consistent with the corresponding request or associated schema.
136 kumpf       1.10     */
137 kumpf       1.4      virtual void deliver(const CIMInstance & instance) = 0;
138 thilo.boehm 1.33     virtual void deliver(const SCMOInstance & instance) = 0;
139 kumpf       1.4  
140 kumpf       1.26     /**
141                          Delivers multiple instance results to the CIM Server.  This method
142                          may be invoked multiple times, if necessary.
143                          @param instances The instances to deliver to the CIM Server.
144 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
145                          not consistent with the corresponding request or associated schema.
146 kumpf       1.10     */
147 kumpf       1.4      virtual void deliver(const Array<CIMInstance> & instances) = 0;
148                  };
149                  
150                  
151 kumpf       1.26 /**
152                      The ObjectPathResponseHandler class is a subclass of the ResponseHandler
153                      class which allows delivery of object path results.
154                  */
155                  class PEGASUS_COMMON_LINKAGE ObjectPathResponseHandler
156                      : virtual public ResponseHandler
157 kumpf       1.4  {
158                  public:
159 kumpf       1.26     /**
160                          Delivers an object path result to the CIM Server.  This method may
161                          be called multiple times when more than one result needs to be
162                          delivered.  An Array form of this method is also available to
163                          deliver multiple results.
164                          @param objectPath The object path to deliver to the CIM Server.
165 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
166                          not consistent with the corresponding request or associated schema.
167 kumpf       1.10     */
168 kumpf       1.4      virtual void deliver(const CIMObjectPath & objectPath) = 0;
169 thilo.boehm 1.33     virtual void deliver(const SCMOInstance & instance) = 0;
170 kumpf       1.4  
171 kumpf       1.26     /**
172                          Delivers multiple object path results to the CIM Server.  This method
173                          may be invoked multiple times, if necessary.
174                          @param objectPaths The object paths to deliver to the CIM Server.
175 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
176                          not consistent with the corresponding request or associated schema.
177 kumpf       1.10     */
178 kumpf       1.4      virtual void deliver(const Array<CIMObjectPath> & objectPaths) = 0;
179                  };
180                  
181                  
182 karl        1.18 /**
183 kumpf       1.26     The MethodResultResponseHandler class is a subclass of the ResponseHandler
184                      class which allows delivery of extrinsic method results.
185 karl        1.18 */
186 kumpf       1.26 class PEGASUS_COMMON_LINKAGE MethodResultResponseHandler
187                      : virtual public ResponseHandler
188 kumpf       1.4  {
189                  public:
190 karl        1.18     /**
191 kumpf       1.26         Delivers extrinsic method output parameters to the CIM Server.
192                          This method may be called multiple times when more than one result
193                          needs to be delivered.  An Array form of this method is also
194                          available to deliver multiple results.
195                          @param outParamValue The output parameter to deliver to the CIM Server.
196 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
197                          not consistent with the corresponding request or associated schema.
198 kumpf       1.26     */
199 kumpf       1.4      virtual void deliverParamValue(const CIMParamValue & outParamValue) = 0;
200                  
201 karl        1.18     /**
202 kumpf       1.26         Delivers a set of output parameters to the CIM Server.  This method
203                          may be invoked multiple times, if necessary.
204                          @param outParamValues An Array of method output parameters to deliver
205                          to the CIM Server.
206 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
207                          not consistent with the corresponding request or associated schema.
208 kumpf       1.26     */
209                      virtual void deliverParamValue(
210                          const Array<CIMParamValue> & outParamValues) = 0;
211 kumpf       1.4  
212 karl        1.18     /**
213 kumpf       1.26         Delivers an extrinsic method return value to the CIM Server.
214                          @param returnValue The return value to deliver to the CIM Server.
215 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
216                          not consistent with the corresponding request or associated schema.
217 kumpf       1.26     */
218 kumpf       1.4      virtual void deliver(const CIMValue & returnValue) = 0;
219                  };
220                  
221                  
222 karl        1.18 /**
223 kumpf       1.26     The IndicationResponseHandler class is a subclass of the ResponseHandler
224                      class which allows delivery of generated indications.
225 karl        1.18 */
226 kumpf       1.26 class PEGASUS_COMMON_LINKAGE IndicationResponseHandler
227                      : virtual public ResponseHandler
228 kumpf       1.4  {
229                  public:
230 karl        1.18     /**
231 kumpf       1.26         Delivers an indication to the CIM Server.  An Array form of this
232                          method is available to deliver multiple indications at once.
233                          Another form is also available to specify the context for the
234                          delivery.
235                          @param indication The indication instance to deliver to the CIM Server.
236 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
237                          not consistent with the corresponding request or associated schema.
238 kumpf       1.26     */
239 kumpf       1.4      virtual void deliver(const CIMIndication & indication) = 0;
240                  
241 kumpf       1.26     /**
242                          Delivers multiple indications to the CIM Server.  Another form of
243                          this method is available to specify the context for the delivery.
244                          @param indications An Array of indication instances to deliver to the
245                          CIM Server.
246 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
247                          not consistent with the corresponding request or associated schema.
248 kumpf       1.26     */
249 kumpf       1.4      virtual void deliver(const Array<CIMIndication> & indications) = 0;
250 kumpf       1.8  
251 kumpf       1.26     /**
252                          Delivers an indication to the CIM Server with a specified context.
253                          An Array form of this method is available to deliver multiple
254                          indications at once.  The context may include data to be associated
255                          with the indication, such as the content language.
256                          @param context A context associated with the indication delivery.
257                          @param indication The indication instance to deliver to the CIM Server.
258 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
259                          not consistent with the corresponding request or associated schema.
260 kumpf       1.26     */
261 kumpf       1.8      virtual void deliver(
262                          const OperationContext & context,
263                          const CIMIndication & indication) = 0;
264                  
265 kumpf       1.26     /**
266                          Delivers multiple indications to the CIM Server with a specified
267                          context.  The context may include data to be associated with the
268                          indications, such as the content language.
269                          @param context A context associated with the indication delivery.
270                          @param indications An Array of indication instances to deliver to the
271                          CIM Server.
272 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
273                          not consistent with the corresponding request or associated schema.
274 kumpf       1.26     */
275 kumpf       1.8      virtual void deliver(
276                          const OperationContext & context,
277                          const Array<CIMIndication> & indications) = 0;
278 kumpf       1.4  };
279                  
280                  
281 kumpf       1.26 /**
282                      The ObjectResponseHandler class is a subclass of the ResponseHandler
283                      class which allows delivery of object results.
284                  */
285                  class PEGASUS_COMMON_LINKAGE ObjectResponseHandler
286                      : virtual public ResponseHandler
287                  {
288                  public:
289                      /**
290                          Delivers an object result to the CIM Server.  This method may
291                          be called multiple times when more than one result needs to be
292                          delivered.  An Array form of this method is also available to
293                          deliver multiple results.
294                          @param object The object to deliver to the CIM Server.
295 kumpf       1.27         @exception Exception May be thrown if the data that is delivered is
296                          not consistent with the corresponding request or associated schema.
297 kumpf       1.10     */
298 kumpf       1.4      virtual void deliver(const CIMObject & object) = 0;
299 thilo.boehm 1.33     virtual void deliver(const CIMInstance & instance) = 0;
300                      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