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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2