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

Diff for /pegasus/src/Pegasus/Common/ResponseHandler.h between version 1.3 and 1.4

version 1.3, 2001/12/14 22:44:06 version 1.4, 2002/09/04 20:41:49
Line 1 
Line 1 
 //%/////-*-c++-*-//////////////////////////////////////////////////////////////  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
   // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 22 
Line 23 
 // //
 // Author: Chip Vincent (cvincent@us.ibm.com) // Author: Chip Vincent (cvincent@us.ibm.com)
 // //
 // Modified By:  // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 31 
Line 32 
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/OperationContext.h>  #include <Pegasus/Provider/Linkage.h>
   
   #include <Pegasus/Common/CIMInstance.h>
   #include <Pegasus/Common/CIMObjectPath.h>
   #include <Pegasus/Common/CIMParamValue.h>
   #include <Pegasus/Common/CIMValue.h>
   #include <Pegasus/Common/CIMIndication.h>
   #include <Pegasus/Common/CIMObject.h>
   #include <Pegasus/Common/CIMClass.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 template<class object_type>  /**
 class PEGASUS_COMMON_LINKAGE ResponseHandler  Callback to deliver results to the CIMOM.
   
   <p>The <tt>ResponseHandler</tt> class allows a provider
   to report operation progress and results to the CIMOM.
   Subclasses are defined for each of the types of object
   that a provider can deliver to the CIMOM.
   A <tt>ResponseHandler</tt> object of the appropriate type
   is passed to provider
   functions that are invoked to process client requests (it
   is not passed to the <tt>{@link initialize initialize}</tt>
   or <tt>{@link terminate terminate}</tt> functions). It
   contains the following public member functions that
   may be used to deliver results to the CIMOM:</p>
   <ul>
   <li><tt>{@link processing processing}</tt> - inform the CIMOM
   that delivery of results is beginning</li>
   <li><tt>{@link deliver deliver}</tt> - deliver an incremental
   result to the CIMOM; the CIMOM accumulates results as
   they are received from the provider</li>
   <li><tt>{@link complete complete}</tt> - inform the CIMOM that
   process of the request is complete and that no further
   results will be delivered</li>
   </ul>
   */
   
   class PEGASUS_PROVIDER_LINKAGE ResponseHandler
 { {
 public: public:
 //    enum ProcessingClass { POLL, SIGNAL };  
 //    enum FilteringClass { INDISCRETE, DISCRETIONARY };  
  
       /** ATTN:      /**
       Destructor.
       */       */
       ResponseHandler(void) {};      virtual ~ResponseHandler(void);
  
       /** ATTN:      /**
       Deliver a possibly partial result to CIMOM.
       <p>The <tt>deliver</tt> function is used by providers to
       deliver results to the CIMOM. For operations that require a
       single element result (<tt>getInstance</tt>, for example),
       <tt>deliver</tt> should be called only once to deliver the
       entire result. For operations that involve
       enumeration, the single-element form shown here may be
       used, each iteration delivering an incremental element
       of the total result. The Array form below may be used
       to deliver a larger set of result elements.</p>
       */
       //virtual void deliver(const T & object);
   
       /**
       Deliver a set of results to CIMOM.
       <p>This form of the <tt>deliver</tt> function may be used
       to return a set of elements to the CIMOM. The set is not
       required to be complete, and the provider may invoke this
       function multiple times, if necessary. This form should only
       be used when the operation requires a result consisting
       of more than one element, such as an enumeration.</p>
       */
       //virtual void deliver(const Array<T> & objects);
   
       /**
       Inform the CIMOM that delivery of results will begin.
       <p>The provider must call <tt>processing</tt> before
       attempting to call <tt>deliver</tt>.
       */       */
       virtual ~ResponseHandler(void) {};      virtual void processing(void) = 0;
  
       /** ATTN:      /**
       Inform the CIMOM that delivery of results is complete.
       <p>The provider must call <tt>complete</tt> when all
       results have been delivered. It must not call <tt>deliver</tt>
       after calling <tt>complete</tt>.</p>
       */       */
       virtual void deliver(const object_type & object) = 0;      virtual void complete(void) = 0;
   };
  
       /** ATTN:  
       */  
       virtual void deliver(const Array<object_type> & objects) = 0;  
  
       /** ATTN:  //
       */  // InstanceResponseHandler
       virtual void reserve(const Uint32 size) = 0;  //
   class PEGASUS_PROVIDER_LINKAGE InstanceResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliver(const CIMInstance & instance) = 0;
  
       /** ATTN:      virtual void deliver(const Array<CIMInstance> & instances) = 0;
       */  };
       virtual void processing(void) = 0;  
  
       virtual void processing(OperationContext *context) = 0;  
  
       /** ATTN:  //
       */  // ObjectPathResponseHandler
       virtual void complete(void) = 0;  //
   class PEGASUS_PROVIDER_LINKAGE ObjectPathResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliver(const CIMObjectPath & objectPath) = 0;
   
       virtual void deliver(const Array<CIMObjectPath> & objectPaths) = 0;
   };
  
       virtual void complete(OperationContext *context) = 0;  
   //
   // MethodResultResponseHandler
   //
   class PEGASUS_PROVIDER_LINKAGE MethodResultResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliverParamValue(const CIMParamValue & outParamValue) = 0;
   
       virtual void deliverParamValue(const Array<CIMParamValue> & outParamValues) = 0;
   
       virtual void deliver(const CIMValue & returnValue) = 0;
   };
   
   
   //
   // IndicationResponseHandler
   //
   class PEGASUS_PROVIDER_LINKAGE IndicationResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliver(const CIMIndication & indication) = 0;
   
       virtual void deliver(const Array<CIMIndication> & indications) = 0;
   };
   
   
   //
   // ObjectResponseHandler
   //
   class PEGASUS_PROVIDER_LINKAGE ObjectResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliver(const CIMObject & object) = 0;
   
       virtual void deliver(const Array<CIMObject> & objects) = 0;
   };
   
   
   //
   // ValueResponseHandler
   //
   class PEGASUS_PROVIDER_LINKAGE ValueResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliver(const CIMValue & value) = 0;
   
       virtual void deliver(const Array<CIMValue> & values) = 0;
   };
   
   
   //
   // ClassResponseHandler
   //
   class PEGASUS_PROVIDER_LINKAGE ClassResponseHandler : virtual public ResponseHandler
   {
   public:
       virtual void deliver(const CIMClass & classObj) = 0;
   
       virtual void deliver(const Array<CIMClass> & classObjs) = 0;
 }; };
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
 #endif #endif
   


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2