• Main Page
  • Classes
  • Files
  • File List

/var/tmp/axbld-24884/rpm/BUILD/pegasus/src/Pegasus/Common/ResponseHandler.h

00001 //%LICENSE////////////////////////////////////////////////////////////////
00002 //
00003 // Licensed to The Open Group (TOG) under one or more contributor license
00004 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
00005 // this work for additional information regarding copyright ownership.
00006 // Each contributor licenses this file to you under the OpenPegasus Open
00007 // Source License; you may not use this file except in compliance with the
00008 // License.
00009 //
00010 // Permission is hereby granted, free of charge, to any person obtaining a
00011 // copy of this software and associated documentation files (the "Software"),
00012 // to deal in the Software without restriction, including without limitation
00013 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014 // and/or sell copies of the Software, and to permit persons to whom the
00015 // Software is furnished to do so, subject to the following conditions:
00016 //
00017 // The above copyright notice and this permission notice shall be included
00018 // in all copies or substantial portions of the Software.
00019 //
00020 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00024 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00025 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00026 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00027 //
00029 //
00030 //%/////////////////////////////////////////////////////////////////////////////
00031 
00032 #ifndef Pegasus_ResponseHandler_h
00033 #define Pegasus_ResponseHandler_h
00034 
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Array.h>
00037 #include <Pegasus/Common/Linkage.h>
00038 
00039 #include <Pegasus/Common/CIMInstance.h>
00040 #include <Pegasus/Common/CIMObjectPath.h>
00041 #include <Pegasus/Common/CIMParamValue.h>
00042 #include <Pegasus/Common/CIMValue.h>
00043 #include <Pegasus/Common/CIMIndication.h>
00044 #include <Pegasus/Common/CIMObject.h>
00045 #include <Pegasus/Common/CIMClass.h>
00046 #include <Pegasus/Common/OperationContext.h>
00047 
00048 PEGASUS_NAMESPACE_BEGIN
00049 
00055 class PEGASUS_COMMON_LINKAGE ResponseHandler
00056 {
00057 public:
00058 
00062     virtual ~ResponseHandler();
00063 
00064     // This method is defined in subclasses, specialized for
00065     // the appropriate data type.
00066     //virtual void deliver(const T & object);
00067 
00068     // This method is defined in subclasses, specialized for
00069     // the appropriate data type.
00070     //virtual void deliver(const Array<T> & objects);
00071 
00076     virtual void processing() = 0;
00077 
00083     virtual void complete() = 0;
00084 
00093     void setContext(const OperationContext & context);
00094 
00095 protected:
00096 
00100     ResponseHandler();
00101 
00105     ResponseHandler(const ResponseHandler& handler);
00106 
00110     ResponseHandler& operator=(const ResponseHandler& handler);
00111 
00115     OperationContext getContext() const;
00116 };
00117 
00122 class PEGASUS_COMMON_LINKAGE InstanceResponseHandler
00123     : virtual public ResponseHandler
00124 {
00125 public:
00135     virtual void deliver(const CIMInstance & instance) = 0;
00136 
00144     virtual void deliver(const Array<CIMInstance> & instances) = 0;
00145 };
00146 
00147 
00152 class PEGASUS_COMMON_LINKAGE ObjectPathResponseHandler
00153     : virtual public ResponseHandler
00154 {
00155 public:
00165     virtual void deliver(const CIMObjectPath & objectPath) = 0;
00166 
00174     virtual void deliver(const Array<CIMObjectPath> & objectPaths) = 0;
00175 };
00176 
00177 
00182 class PEGASUS_COMMON_LINKAGE MethodResultResponseHandler
00183     : virtual public ResponseHandler
00184 {
00185 public:
00195     virtual void deliverParamValue(const CIMParamValue & outParamValue) = 0;
00196 
00205     virtual void deliverParamValue(
00206         const Array<CIMParamValue> & outParamValues) = 0;
00207 
00214     virtual void deliver(const CIMValue & returnValue) = 0;
00215 };
00216 
00217 
00222 class PEGASUS_COMMON_LINKAGE IndicationResponseHandler
00223     : virtual public ResponseHandler
00224 {
00225 public:
00235     virtual void deliver(const CIMIndication & indication) = 0;
00236 
00245     virtual void deliver(const Array<CIMIndication> & indications) = 0;
00246 
00257     virtual void deliver(
00258         const OperationContext & context,
00259         const CIMIndication & indication) = 0;
00260 
00271     virtual void deliver(
00272         const OperationContext & context,
00273         const Array<CIMIndication> & indications) = 0;
00274 };
00275 
00276 
00281 class PEGASUS_COMMON_LINKAGE ObjectResponseHandler
00282     : virtual public ResponseHandler
00283 {
00284 public:
00294     virtual void deliver(const CIMObject & object) = 0;
00295 
00303     virtual void deliver(const Array<CIMObject> & objects) = 0;
00304 };
00305 
00306 PEGASUS_NAMESPACE_END
00307 
00308 #endif