OpenWBEM Provider Interface HOWTO
-------------------------------------------------------------------------------

CONTENTS

   1.0 - Provider Interface Multiplexor
   2.0 - Writing a Provider Interface
   3.0 - Provider Interfaces Already Provided.

-------------------------------------------------------------------------------
1.0 Extensible Provider Interface

   Providers are an extension mechanism for all CIMOMs.  When a CIMOM services
   a client request for some type of instance data, that data can come from the 
   CIMOM's internal instance repository (static data) or from one of the
   providers the CIMOM knows about (dynamic data). Providers give a CIMOM the
   capability to serve up just about any kind of data. This capability is pretty
   much standard across the various CIMOM implementations. What is not standard,
   is the interface that providers have with the CIMOM. Providers generally
   provide some set of known entry points for the CIMOM to call into when the
   provider's services are needed. This layer between the CIMOM and the provider
   is what we call the provider interface. Our CIMOM has what we call a provider
   interface multi-plexor. It is capable of supporting any number of provider
   interfaces at the same time. A new provider interface can be added to the
   CIMOM by simply creating a shared library that can create an ProviderIFC
   object and placing it in the directory the CIMOM loads it's provider 
   interfaces from (this is specified in the CIMOM's configuration file). The
   format of the provider qualifier that the CIMOM understands is 
   "[interface id]::[interface specific text]". The "interface id" is used by
   the provider interface multi-plexor to identify the provider interface that
   can supply the provider.  The "interface specific text" is given to the
   provider interface once it is found, so it can use it to find the appropriate
   provider. This makes our CIMOM very flexible 
   when it comes to providers. You could conceivably write a provider interface 
   that would provide an interface for Java, Python or Perl providers.
   
   The only component within the CIMOM that deals directly with provider
   interfaces is the provider manager (ProviderManager). The provider
   manager is the provider interface multiplexor. When the CIMOM is first
   started, an instance of an ProviderManager is created. When the
   ProviderManager is created it will load all of the shared libraries in the
   designated provider interface directory (specified in the configuration file
   with the owcimomd.provider_ifc_libs option). ProviderManager expects every
   library it loads to have a createProviderIFC function. The prototype for this
   function is as follows:
   
      extern "C" OpenWBEM::ProviderIFCBaseIFC* createProviderIFC();
      
   The createProviderIFC function is responsible for creating an instance
   of some sub-class of ProviderIFCBaseIFC and returning to the provider manager.
   The ProviderIFCBaseIFC instance will be owned by the ProviderManager from
   that point. It will be deleted when it is no longer needed.
      
   If the provider manager does not find createProviderIFC function, the shared
   library will be ignored.
   
-------------------------------------------------------------------------------
2.0 Writing a Provider Interface

   Writing a provider interface is actually a relatively simple thing to do.
   There is a base class called ProviderIFCBaseIFC found in 
   OW_ProviderIFCBaseIFC.hpp.
   You will have to create a class that sub-classes ProviderIFCBaseIFC:
   
      #include <OW_ProviderIFCBaseIFC.hpp>
      
      class MyProviderIFC : public ProviderIFCBaseIFC
      {
         ...
      };

      
   Please see the header file OW_ProviderIFCBaseIFC.hpp for a description of
   all the methods that need to be implemented.

   The provider interface must be placed in a shared library that provides
   a createProviderIFC() function. This function is described in section
   1.0 Extensible Provider Interface.
   
-------------------------------------------------------------------------------
3.0 Provider Interfaces Already Provided.

      3.1 C++ Provider Interface
         This is probably the best source of information at this point on
         implementing a provider interface. This is a relatively simple
         interface that is similar to the provider interface found on Sun's and
         SNIA's Java CIMOM implementation. No mapping of the CIM objects is
         required. The format of the provider qualifier would be
         "c++::provider id". The C++ provider interface would use the provider
         id string to identify the provider if it was previously loaded. If it
         wasn't previously loaded it would prepend the string "lib" to the front
         of the provider id string and append ".so" to the end of it, and then
         use the resulting string to identify the shared library that contained
         the provider being requested. The source code for this provider
         interface is contained in the following files:
            ./src/ifcs/cpp/OW_CppProviderIFC.hpp
            ./src/ifcs/cpp/OW_CppProviderIFC.cpp

      3.2 NPI
      3.3 CMPI
      3.4 Perl
      3.5 Remote - Not completed yet.
      3.6 Java - Not completed yet.


This file last updated: Wed Dec  3 22:48:08 MST 2003

