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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2