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

Diff for /pegasus/src/Pegasus/IndicationService/IndicationService.h between version 1.32 and 1.33

version 1.32, 2003/03/12 21:45:08 version 1.33, 2003/06/25 15:41:09
Line 101 
Line 101 
  
 }; };
  
   
 /** /**
     Entry for Subscription table      Entry for ActiveSubscriptions table
  */  */
 struct SubscriptionTableEntry  struct ActiveSubscriptionsTableEntry
 { {
     CIMInstance subscription;     CIMInstance subscription;
     CIMInstance provider;      Array <ProviderClassList> providers;
     Array <CIMName> classList;  };
   
   /**
       Table for active subscription information
   
       The ActiveSubscriptions table is used to keep track of active subscriptions.
       Each entry consists of a Subscription instance, and a list of
       ProviderClassList structs representing the providers currently serving each
       subscription and the relevant indication subclasses served by each provider.
       The Key is generated by concatenating the namespace name of the
       subscription instance, and the subscription instance key values (filter and
       handler key values).
       The _handleProcessIndicationRequest() function, when a list of
       subscriptions is included in request, looks up each subscription in the
       table.
       The _handleNotifyProviderRegistrationRequest() function, once matching
       subscriptions have been identified, looks up the provider information for
       each matching subscription in the table.
       The _handleModifyInstanceRequest() and _handleDeleteInstanceRequest()
       functions, when sending delete requests to providers, look up the providers
       for the subscription in the table.
       The _handleNotifyProviderTerminationRequest() function, when a provider is
       disabled, iterates through the table to retrieve all active
       subscriptions being served by the provider.
       The terminate() function, when the CIM Server is being shut down, iterates
       through the table to retrieve all active subscriptions.
    */
   typedef HashTable <String,
                      ActiveSubscriptionsTableEntry,
                      EqualFunc <String>,
                      HashFunc <String> > ActiveSubscriptionsTable;
   
   /**
       Entry for SubscriptionClasses table
    */
   struct SubscriptionClassesTableEntry
   {
       CIMName indicationClassName;
       CIMNamespaceName sourceNamespaceName;
       Array <CIMInstance> subscriptions;
 }; };
  
 /** /**
     Table for subscription information.      Table for subscription classes information
     The table keys are generated by concatenating the Subscription namespace  
     name, Filter and Handler key values, and Provider key values.  Each table      The SubscriptionClasses Table is used to keep track of active subscriptions
     value includes the Subscription, the Provider, and the list of classnames.      for each indication subclass-source namespace pair.
     The key allows quick access when the subscription and provider are both      Each entry consists of an indication subclass name, a source namespace name,
     known (i.e. initialize, instance operations, provider registration changes).      and a list of subscription instances.
     When only the provider is known (i.e. provider termination), an iterator is      The Key is generated by concatenating the indication subclass name, and the
     used to search the table.  That is, the table is designed to optimize all      source namespace name.
     operations except provider termination.      The _handleProcessIndicationRequest() function, when no list of
       subscriptions is included in the request, looks up matching subscriptions
       in the table, using the class name and namespace name of the indication
       instance.
       The _handleNotifyProviderRegistrationRequest() function, when an indication
       provider registration instance has been created or deleted, looks up
       matching subscriptions in the table, using the class name and namespace
       names from the provider registration instance.
  */  */
 typedef HashTable <String, typedef HashTable <String,
                    SubscriptionTableEntry,                     SubscriptionClassesTableEntry,
                    EqualFunc <String>,                    EqualFunc <String>,
                    HashFunc <String> > SubscriptionTable;                     HashFunc <String> > SubscriptionClassesTable;
  
 /** /**
  
Line 200 
Line 245 
     void _handleNotifyProviderRegistrationRequest(const Message * message);     void _handleNotifyProviderRegistrationRequest(const Message * message);
  
     /**     /**
         Notifies the Indication Service that a provider has          Determines if the specified provider is in the list of providers
         terminated (either intentionally or abnormally).  The          serving the subscription.
         Indication Service retrieves the subscriptions affected by the  
           @param   provider              the provider instance
           @param   tableValue            the Active Subscriptions Table entry
   
           @return  The index of the provider in the list, if found
                    PEG_NOT_FOUND otherwise
       */
       Uint32 _providerInList
           (const CIMInstance & provider,
            const ActiveSubscriptionsTableEntry & tableValue);
   
       /**
           Determines if the specified class is in the list of indication
           subclasses served by the specified provider, serving the subscription.
   
           @param   className             the class name
           @param   providerClasses       the list of providers serving the
                                          subscription, with the classes served
   
           @return  The index of the class name in the list, if found
                    PEG_NOT_FOUND otherwise
       */
       Uint32 _classInList
           (const CIMName & className,
            const ProviderClassList & providerClasses);
   
       /**
           Notifies the Indication Service that a provider has been disabled.
           The Indication Service retrieves the subscriptions affected by the
         termination, and sends an alert to handler instances of         termination, and sends an alert to handler instances of
         subscriptions that are no longer served by the provider.         subscriptions that are no longer served by the provider.
      */      */
Line 218 
Line 291 
         If the subscription's policy is Remove, the subscription instance is         If the subscription's policy is Remove, the subscription instance is
         deleted.         deleted.
  
         @param   subscription          the subscription named instance          @param   subscription          the subscription instance
  
         @return  True if the subscription has been disabled or deleted         @return  True if the subscription has been disabled or deleted
                  False otherwise                  False otherwise
Line 233 
Line 306 
         longer be served, and the subscription's policy is Disable.         longer be served, and the subscription's policy is Disable.
         The Subscription State is set to Disabled.         The Subscription State is set to Disabled.
  
         @param   subscription          the subscription named instance          @param   subscription          the subscription instance
      */      */
     void _disableSubscription (     void _disableSubscription (
         CIMInstance subscription);         CIMInstance subscription);
Line 245 
Line 318 
         longer be served, and the subscription's policy is Remove.         longer be served, and the subscription's policy is Remove.
         The subscription instance is deleted.         The subscription instance is deleted.
  
         @param   subscription          the subscription named instance          @param   subscription          the subscription instance
      */      */
     void _deleteSubscription (     void _deleteSubscription (
         const CIMInstance subscription);         const CIMInstance subscription);
Line 402 
Line 475 
         const String & currentUser);         const String & currentUser);
  
     /**     /**
         Retrieves list of enabled subscription instances in all namespaces.          Retrieves list of enabled subscription instances in all namespaces from
           the repository.
   
           @return   list of CIMInstance subscriptions
        */
       Array <CIMInstance> _getActiveSubscriptionsFromRepository () const;
   
       /**
           Retrieves list of enabled subscription instances in all namespaces from
           the Active Subscriptions table.
  
         @return   list of CIMInstance subscriptions         @return   list of CIMInstance subscriptions
      */      */
Line 474 
Line 556 
  
         @param   nameSpace             the namespace         @param   nameSpace             the namespace
  
         @return   List of subscription named instances          @return   List of subscription instances
      */      */
     Array <CIMInstance> _getSubscriptions (     Array <CIMInstance> _getSubscriptions (
         const CIMNamespaceName & nameSpaceName) const;         const CIMNamespaceName & nameSpaceName) const;
Line 495 
Line 577 
  
     /**     /**
         Retrieves list of enabled subscription instances in all namespaces,         Retrieves list of enabled subscription instances in all namespaces,
         that are served by the specified provider.          that are served by the specified provider.  This function is called
           when a provider is disabled.  In the Active Subscriptions table, the
           specified provider is removed from the list of providers serving the
           subscription.  If there are no remaining providers serving the
           subscription, the subscription is removed from the Active Subscriptions
           table.
  
         @param   provider          the provider instance         @param   provider          the provider instance
  
Line 755 
Line 842 
         If no indication providers are found, condition and queryLanguage are         If no indication providers are found, condition and queryLanguage are
         set to empty string.         set to empty string.
  
         @param   nameSpace             Input namespace name (of subscription)          @param   nameSpaceName         Input namespace name (of subscription)
         @param   subscription          Input subscription instance          @param   subscriptionInstance  Input subscription instance
           @param   indicationSubclasses  Output list of subclasses of indication
                                              class in filter query
         @param   indicationProviders   Output list of providers with associated         @param   indicationProviders   Output list of providers with associated
                                            classes                                            classes
         @param   propertyList          Output list of properties required by the         @param   propertyList          Output list of properties required by the
Line 769 
Line 858 
     void _getCreateParams (     void _getCreateParams (
         const CIMNamespaceName & nameSpaceName,         const CIMNamespaceName & nameSpaceName,
         const CIMInstance & subscriptionInstance,         const CIMInstance & subscriptionInstance,
           Array <CIMName> & indicationSubclasses,
         Array <ProviderClassList> & indicationProviders,         Array <ProviderClassList> & indicationProviders,
         CIMPropertyList & propertyList,         CIMPropertyList & propertyList,
         CIMNamespaceName & sourceNameSpace,         CIMNamespaceName & sourceNameSpace,
Line 779 
Line 869 
         Gets the parameter values required to Create or Modify the subscription         Gets the parameter values required to Create or Modify the subscription
         request.         request.
  
         @param   nameSpace             Input namespace name (of subscription)          @param   nameSpaceName         Input namespace name (of subscription)
         @param   subscription          Input subscription instance          @param   subscriptionInstance  Input subscription instance
           @param   indicationSubclasses  Output list of subclasses of indication
                                              class in filter query
         @param   propertyList          Output list of properties required by the         @param   propertyList          Output list of properties required by the
                                            subscription                                            subscription
         @param   sourceNameSpace       Output source namespace for filter query         @param   sourceNameSpace       Output source namespace for filter query
Line 791 
Line 883 
     void _getCreateParams (     void _getCreateParams (
         const CIMNamespaceName & nameSpaceName,         const CIMNamespaceName & nameSpaceName,
         const CIMInstance & subscriptionInstance,         const CIMInstance & subscriptionInstance,
           Array <CIMName> & indicationSubclasses,
         CIMPropertyList & propertyList,         CIMPropertyList & propertyList,
         CIMNamespaceName & sourceNameSpace,         CIMNamespaceName & sourceNameSpace,
         String & condition,         String & condition,
Line 799 
Line 892 
     /**     /**
         Gets the parameter values required to Delete the subscription request.         Gets the parameter values required to Delete the subscription request.
  
         @param   nameSpace             Input namespace name          @param   nameSpaceName         Input namespace name
         @param   subscription          Input subscription instance          @param   subscriptionInstance  Input subscription instance
           @param   indicationSubclasses  Output list of subclasses of indication
                                              class in filter query
           @param   sourceNameSpace       Output source namespace for filter query
  
         @return  List of providers with associated classes to Delete         @return  List of providers with associated classes to Delete
      */      */
     Array <ProviderClassList> _getDeleteParams (     Array <ProviderClassList> _getDeleteParams (
         const CIMNamespaceName & nameSpaceName,         const CIMNamespaceName & nameSpaceName,
         const CIMInstance & subscriptionInstance);          const CIMInstance & subscriptionInstance,
           Array <CIMName> & indicationSubclasses,
           CIMNamespaceName & sourceNameSpace);
  
       /**       /**
          Asynchronous completion routine for _sendCreateRequests.          Asynchronous completion routine for _sendCreateRequests.
Line 915 
Line 1012 
         const String & authType = String::EMPTY);         const String & authType = String::EMPTY);
  
     /**     /**
         Generates a unique String key from the subscription namespace name and          Generates a unique String key for the Active Subscriptions table from
         key values and provider key values.          the subscription namespace name and key values.
  
         @param   subscription          the subscription instance         @param   subscription          the subscription instance
         @param   provider              the provider instance  
  
         @return  the generated key         @return  the generated key
      */      */
     String _generateKey (      String _generateActiveSubscriptionsKey (
           const CIMObjectPath & subscriptionRef);
   
       /**
           Inserts an entry into the Active Subscriptions table.
   
           @param   subscription          the subscription instance
           @param   providers             the list of providers
        */
       void _insertActiveSubscriptionsEntry (
         const CIMInstance & subscription,         const CIMInstance & subscription,
         const CIMInstance & provider);          const Array <ProviderClassList> & providers);
   
       /**
           Generates a unique String key for the Subscription Classes table from
           the indication class name and source namespace name.
   
           @param   indicationClassName   the indication class name
           @param   sourceNamespaceName   the source namespace name
   
           @return  the generated key
        */
       String _generateSubscriptionClassesKey (
           const CIMName & indicationClassName,
           const CIMNamespaceName & sourceNamespaceName);
   
       /**
           Inserts an entry into the Subscription Classes table.
   
           @param   indicationClassName   the indication class name
           @param   sourceNamespaceName   the source namespace name
           @param   subscriptions         the list of subscription instances
        */
       void _insertSubscriptionClassesEntry (
           const CIMName & indicationClassName,
           const CIMNamespaceName & sourceNamespaceName,
           const Array <CIMInstance> & subscriptions);
  
     /**     /**
         Inserts an entry into the subscription table.          Inserts entries (or updates existing entries) in the
           Active Subscriptions and Subscription Classes tables.
  
         @param   subscription          the subscription instance         @param   subscription          the subscription instance
         @param   provider              the provider instance          @param   providers               the list of providers
         @param   classList             the list of class names          @param   indicationSubclassNames the list of indication subclass names
           @param   sourceNamespaceName     the source namespace name
      */      */
     void _insertEntry (      void _insertToHashTables (
         const CIMInstance & subscription,         const CIMInstance & subscription,
         const CIMInstance & provider,          const Array <ProviderClassList> & providers,
         const Array <CIMName> classList);          const Array <CIMName> & indicationSubclassNames,
           const CIMNamespaceName & sourceNamespaceName);
   
       /**
           Removes entries (or updates entries) in the Active Subscriptions and
           Subscription Classes tables.
   
           @param   subscription            the subscription instance
           @param   indicationSubclassNames the list of indication subclass names
           @param   sourceNamespaceName     the source namespace name
        */
       void _removeFromHashTables (
           const CIMInstance & subscription,
           const Array <CIMName> & indicationSubclassNames,
           const CIMNamespaceName & sourceNamespaceName);
  
     /**     /**
         Creates an alert instance of the specified class.         Creates an alert instance of the specified class.
Line 952 
Line 1098 
         const CIMName & alertClassName,         const CIMName & alertClassName,
         const Array <CIMInstance> & subscriptions);         const Array <CIMInstance> & subscriptions);
  
   
   
       /**       /**
           Asynchronous completion routine for _sendAlerts           Asynchronous completion routine for _sendAlerts
       */       */
Line 962 
Line 1106 
                                       MessageQueue *callback_destination,                                       MessageQueue *callback_destination,
                                       void *parameter);                                       void *parameter);
  
   
     /**     /**
         Sends specified alert to each unique handler instance for the         Sends specified alert to each unique handler instance for the
         specified subscriptions in the list.         specified subscriptions in the list.
Line 975 
Line 1118 
         const Array <CIMInstance> & subscriptions,         const Array <CIMInstance> & subscriptions,
         /* const */ CIMInstance & alertInstance);         /* const */ CIMInstance & alertInstance);
  
   
       /** Async completion routine for _sendEnable */       /** Async completion routine for _sendEnable */
  
       static void _sendEnableCallBack(AsyncOpNode *operation,       static void _sendEnableCallBack(AsyncOpNode *operation,
                                      MessageQueue *callback_destination,                                      MessageQueue *callback_destination,
                                      void *parameter);                                      void *parameter);
  
   
     /**     /**
         Sends an Enable message to the specified provider.         Sends an Enable message to the specified provider.
  
Line 1017 
Line 1158 
     //Uint32 _repository;     //Uint32 _repository;
  
     /**     /**
         Subscription information table          Active Subscriptions information table
        */
       ActiveSubscriptionsTable _activeSubscriptionsTable;
   
       /**
           Subscription Classes information table
      */      */
     SubscriptionTable _subscriptionTable;      SubscriptionClassesTable _subscriptionClassesTable;
  
     Array <Uint16> _validStates;     Array <Uint16> _validStates;
     Array <Uint16> _validRepeatPolicies;     Array <Uint16> _validRepeatPolicies;


Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2