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

  1 a.dunfey 1.23.18.1 //%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 a.dunfey 1.23.18.1 // 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 a.dunfey 1.23.18.2     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 a.dunfey 1.23.18.2         Destructs the ResponseHandler.
 63 kumpf    1.4           */
 64 a.dunfey 1.23.18.2     virtual ~ResponseHandler();
 65 kumpf    1.4       
 66 a.dunfey 1.23.18.2     // 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 a.dunfey 1.23.18.2     // 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 a.dunfey 1.23.18.2         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 a.dunfey 1.23.18.2     virtual void processing() = 0;
 79 chuck    1.11      
 80 kumpf    1.4           /**
 81 a.dunfey 1.23.18.2         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 a.dunfey 1.23.18.2     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 a.dunfey        1.23.18.2         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 a.dunfey        1.23.18.2 
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 a.dunfey        1.23.18.2         Gets the context for the results delivered to the CIM Server.
112 karl            1.18          */
113 a.dunfey        1.23.18.2     OperationContext getContext() const;
114 kumpf           1.4       };
115                           
116                           
117 karl            1.18      /**
118 a.dunfey        1.23.18.2     The InstanceResponseHandler class is a subclass of the ResponseHandler
119                               class which allows delivery of instance results.
120 karl            1.18      */
121 a.dunfey        1.23.18.2 class PEGASUS_COMMON_LINKAGE InstanceResponseHandler
122                               : virtual public ResponseHandler
123 kumpf           1.4       {
124                           public:
125 a.dunfey        1.23.18.2     /**
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                                   @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 a.dunfey        1.23.18.2     /**
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                                   @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 a.dunfey        1.23.18.2 /**
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 a.dunfey        1.23.18.2     /**
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                                   @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 a.dunfey        1.23.18.2     /**
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                                   @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 a.dunfey        1.23.18.2     The MethodResultResponseHandler class is a subclass of the ResponseHandler
179                               class which allows delivery of extrinsic method results.
180 karl            1.18      */
181 a.dunfey        1.23.18.2 class PEGASUS_COMMON_LINKAGE MethodResultResponseHandler
182                               : virtual public ResponseHandler
183 kumpf           1.4       {
184                           public:
185 karl            1.18          /**
186 a.dunfey        1.23.18.2         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                                   @exception Exception May be thrown if the data that is delivered is
192                                   not consistent with the corresponding request or associated schema.
193                               */
194 kumpf           1.4           virtual void deliverParamValue(const CIMParamValue & outParamValue) = 0;
195                           
196 karl            1.18          /**
197 a.dunfey        1.23.18.2         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                                   @exception Exception May be thrown if the data that is delivered is
202                                   not consistent with the corresponding request or associated schema.
203                               */
204                               virtual void deliverParamValue(
205                                   const Array<CIMParamValue> & outParamValues) = 0;
206 kumpf           1.4       
207 karl            1.18          /**
208 a.dunfey        1.23.18.2         Delivers an extrinsic method return value to the CIM Server.
209                                   @param returnValue The return value to deliver to the CIM Server.
210                                   @exception Exception May be thrown if the data that is delivered is
211                                   not consistent with the corresponding request or associated schema.
212                               */
213 kumpf           1.4           virtual void deliver(const CIMValue & returnValue) = 0;
214                           };
215                           
216                           
217 karl            1.18      /**
218 a.dunfey        1.23.18.2     The IndicationResponseHandler class is a subclass of the ResponseHandler
219                               class which allows delivery of generated indications.
220 karl            1.18      */
221 a.dunfey        1.23.18.2 class PEGASUS_COMMON_LINKAGE IndicationResponseHandler
222                               : virtual public ResponseHandler
223 kumpf           1.4       {
224                           public:
225 karl            1.18          /**
226 a.dunfey        1.23.18.2         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                                   @exception Exception May be thrown if the data that is delivered is
232                                   not consistent with the corresponding request or associated schema.
233                               */
234 kumpf           1.4           virtual void deliver(const CIMIndication & indication) = 0;
235                           
236 a.dunfey        1.23.18.2     /**
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                                   @exception Exception May be thrown if the data that is delivered is
242                                   not consistent with the corresponding request or associated schema.
243                               */
244 kumpf           1.4           virtual void deliver(const Array<CIMIndication> & indications) = 0;
245 kumpf           1.8       
246 a.dunfey        1.23.18.2     /**
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                                   @exception Exception May be thrown if the data that is delivered is
254                                   not consistent with the corresponding request or associated schema.
255                               */
256 kumpf           1.8           virtual void deliver(
257                                   const OperationContext & context,
258                                   const CIMIndication & indication) = 0;
259                           
260 a.dunfey        1.23.18.2     /**
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                                   @exception Exception May be thrown if the data that is delivered is
268                                   not consistent with the corresponding request or associated schema.
269                               */
270 kumpf           1.8           virtual void deliver(
271                                   const OperationContext & context,
272                                   const Array<CIMIndication> & indications) = 0;
273 kumpf           1.4       };
274                           
275                           
276 a.dunfey        1.23.18.2 /**
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                                   @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 a.dunfey        1.23.18.2     /**
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                                   @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