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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2