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

  1 mday  1.29 //%////-*-c++-*-////////////////////////////////////////////////////////////////
  2 chip  1.1  //
  3 kumpf 1.25 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4            // The Open Group, Tivoli Systems
  5 chip  1.1  //
  6            // Permission is hereby granted, free of charge, to any person obtaining a copy
  7            // of this software and associated documentation files (the "Software"), to
  8            // deal in the Software without restriction, including without limitation the
  9            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10            // sell copies of the Software, and to permit persons to whom the Software is
 11            // furnished to do so, subject to the following conditions:
 12 kumpf 1.25 // 
 13 chip  1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21            //
 22            //==============================================================================
 23            //
 24            // Author: Chip Vincent (cvincent@us.ibm.com)
 25            //
 26            // Modified By:
 27            //              Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
 28            //              Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
 29            //              Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
 30            //              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 31 kumpf 1.28 //              Carol Ann Krug Graves, Hewlett-Packard Company
 32            //                (carolann_graves@hp.com)
 33 chip  1.1  //
 34            //%/////////////////////////////////////////////////////////////////////////////
 35            
 36            #ifndef Pegasus_ProviderManagerService_h
 37            #define Pegasus_ProviderManagerService_h
 38            
 39            #include <Pegasus/Common/Config.h>
 40 chip  1.23 #include <Pegasus/Common/MessageQueueService.h>
 41            #include <Pegasus/Common/CIMObjectPath.h>
 42 chip  1.3  #include <Pegasus/Common/Pair.h>
 43 sage  1.24 #include <Pegasus/Common/Triad.h>
 44 chip  1.3  #include <Pegasus/Common/Thread.h>
 45 chip  1.6  
 46            #include <Pegasus/ProviderManager/SafeQueue.h>
 47 kumpf 1.27 #include <Pegasus/Server/Linkage.h>
 48 mday  1.29 #include <Pegasus/ProviderManager/OperationResponseHandler.h>
 49            #include <Pegasus/Common/HashTable.h>
 50            #include <Pegasus/ProviderManager/Provider.h>
 51            #include <Pegasus/Common/Constants.h>
 52            PEGASUS_NAMESPACE_BEGIN
 53 chip  1.1  
 54 mday  1.29 typedef HashTable<String, 
 55            		  EnableIndicationsResponseHandler *,
 56            		  EqualFunc<String>, 
 57            		  HashFunc<String> > IndicationResponseTable;
 58 chip  1.1  
 59 kumpf 1.9  class ProviderRegistrationManager;
 60 chip  1.3  
 61 chip  1.1  class PEGASUS_SERVER_LINKAGE ProviderManagerService : public MessageQueueService
 62            {
 63 mday  1.29.4.2 public:
 64                    ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager);
 65                    virtual ~ProviderManagerService(void);
 66                    static ProviderManager *getProviderManager(void);
 67                    
 68 mday  1.26         
 69 chip  1.3      protected:
 70 chip  1.8          virtual Boolean messageOK(const Message * message);
 71                    virtual void handleEnqueue(void);
 72                    virtual void handleEnqueue(Message * message);
 73                
 74                    virtual void _handle_async_request(AsyncRequest * request);
 75 chip  1.3      
 76                protected:
 77 mday  1.29.4.2     virtual Triad<String, String, String> 
 78                      _lookupConsumerProvider(const CIMObjectPath & objectPath);
 79                 
 80 sage  1.24         virtual Triad<String, String, String>
 81                        _lookupProviderForClass(const CIMObjectPath & objectPath);
 82                
 83                    virtual Triad<String, String, String> _lookupMethodProviderForClass(
 84 kumpf 1.22     	const CIMObjectPath & objectPath,
 85 kumpf 1.28     	const CIMName & methodName);
 86 chip  1.3      
 87 sage  1.17         virtual void _lookupProviderForAssocClass(
 88                        const CIMObjectPath & objectPath, const String& assocClassName,
 89                        const String& resultClassName,
 90 sage  1.24             Array<String>& Locations, Array<String>& providerNames,
 91                        Array<String>& interfaceNames);
 92 sage  1.17     
 93 chip  1.8      protected:
 94 chip  1.23         //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
 95 chip  1.1      
 96 chip  1.8          //void handleStartService();
 97                    //void handleStopService();
 98                    //void handlePauseService();
 99                    //void handleResumeService();
100                
101                    static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(void * arg) throw();
102                
103 chip  1.13         //void handleGetClassRequest(const Message * message) throw();
104                    //void handleEnumerateClassesRequest(const Message * message) throw();
105                    //void handleEnumerateClassNamesRequest(const Message * message) throw();
106                    //void handleCreateClassRequest(const Message * message) throw();
107                    //void handleModifyClassRequest(const Message * message) throw();
108                    //void handleDeleteClassRequest(const Message * message) throw();
109                
110 mday  1.19         void handleGetInstanceRequest(AsyncOpNode *op, const Message *message) throw();
111                    void handleEnumerateInstancesRequest(AsyncOpNode *op, const Message *message) throw();
112                    void handleEnumerateInstanceNamesRequest(AsyncOpNode *op, const Message *message) throw();
113                    void handleCreateInstanceRequest(AsyncOpNode *op, const Message *message) throw();
114                    void handleModifyInstanceRequest(AsyncOpNode *op, const Message *message) throw();
115                    void handleDeleteInstanceRequest(AsyncOpNode *op, const Message *message) throw();
116                
117                    void handleExecuteQueryRequest(AsyncOpNode *op, const Message *message) throw();
118                
119                    void handleAssociatorsRequest(AsyncOpNode *op, const Message *message) throw();
120                    void handleAssociatorNamesRequest(AsyncOpNode *op, const Message *message) throw();
121                    void handleReferencesRequest(AsyncOpNode *op, const Message *message) throw();
122                    void handleReferenceNamesRequest(AsyncOpNode *op, const Message *message) throw();
123                
124                    void handleGetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
125                    void handleSetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
126                
127                    void handleInvokeMethodRequest(AsyncOpNode *op, const Message *message) throw();
128                
129                    void handleCreateSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
130                    void handleModifySubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
131 mday  1.19         void handleDeleteSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
132                    void handleEnableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
133                    void handleDisableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
134 chip  1.20     
135 mday  1.19         void handleDisableModuleRequest(AsyncOpNode *op, const Message *message) throw();
136                    void handleEnableModuleRequest(AsyncOpNode *op, const Message *message) throw();
137 kumpf 1.21         void handleStopAllProvidersRequest(AsyncOpNode *op, const Message *message) throw();
138 mday  1.29.4.2     void handleConsumeIndicationRequest(AsyncOpNode *op, 
139                					const Message *message) throw();
140                    
141 mday  1.29     
142                    /**
143                        Inserts an entry into the enabled indication providers table.
144                
145                        @param   provider              the provider instance
146                        @param   handler               pointer to the indication response handler
147                    */
148                
149                      void _insertEntry(
150                	 const Provider & provider,
151                	 const EnableIndicationsResponseHandler *handler);
152                
153                    /**
154                        Generates a String key from by combining the provider and provider
155                	module names.
156                
157                        @param   provider              the provider instance
158                
159                        @return  the generated key
160                     */
161                
162 mday  1.29     
163                      EnableIndicationsResponseHandler * _removeEntry(
164                	 const String & key);
165                      
166                      
167                
168                      String _generateKey (
169                	 const Provider & provider);
170                      
171 chip  1.3      protected:
172 chip  1.8      
173 mday  1.19         SafeQueue<AsyncOpNode *> _incomingQueue;
174 chip  1.13         //SafeQueue<Message *> _outgoingQueue;
175 chip  1.1      
176 chip  1.11         ProviderRegistrationManager * _providerRegistrationManager;
177 mday  1.29         /** Table holding indication response handlers, one for each provider
178                	that has indications enabled.
179                    */
180                    
181                    IndicationResponseTable _responseTable;
182                    
183 chip  1.1      };
184                
185                PEGASUS_NAMESPACE_END
186                
187                #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2