(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 mday  1.30 // Copyright (c) 2000 - 2003 BMC Software, Hewlett-Packard Company, IBM,
  4 kumpf 1.25 // 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 mday  1.30 //              Mike Day, IBM (mdday@us.ibm.com)
 34 chip  1.1  //
 35            //%/////////////////////////////////////////////////////////////////////////////
 36            
 37            #ifndef Pegasus_ProviderManagerService_h
 38            #define Pegasus_ProviderManagerService_h
 39            
 40            #include <Pegasus/Common/Config.h>
 41 chip  1.23 #include <Pegasus/Common/MessageQueueService.h>
 42            #include <Pegasus/Common/CIMObjectPath.h>
 43 chip  1.3  #include <Pegasus/Common/Pair.h>
 44 sage  1.24 #include <Pegasus/Common/Triad.h>
 45 chip  1.3  #include <Pegasus/Common/Thread.h>
 46 chip  1.6  
 47            #include <Pegasus/ProviderManager/SafeQueue.h>
 48 kumpf 1.27 #include <Pegasus/Server/Linkage.h>
 49 mday  1.29 #include <Pegasus/ProviderManager/OperationResponseHandler.h>
 50            #include <Pegasus/Common/HashTable.h>
 51            #include <Pegasus/ProviderManager/Provider.h>
 52            #include <Pegasus/Common/Constants.h>
 53            PEGASUS_NAMESPACE_BEGIN
 54 chip  1.1  
 55 mday  1.30 
 56 mday  1.29 typedef HashTable<String, 
 57            		  EnableIndicationsResponseHandler *,
 58            		  EqualFunc<String>, 
 59            		  HashFunc<String> > IndicationResponseTable;
 60 chip  1.1  
 61 kumpf 1.9  class ProviderRegistrationManager;
 62 chip  1.3  
 63 chip  1.1  class PEGASUS_SERVER_LINKAGE ProviderManagerService : public MessageQueueService
 64            {
 65 chip  1.3  public:
 66 chip  1.10     ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager);
 67 chip  1.8      virtual ~ProviderManagerService(void);
 68 mday  1.30     static ProviderManager *getProviderManager(void);
 69                
 70 mday  1.26     
 71 chip  1.3  protected:
 72 chip  1.8      virtual Boolean messageOK(const Message * message);
 73                virtual void handleEnqueue(void);
 74                virtual void handleEnqueue(Message * message);
 75            
 76                virtual void _handle_async_request(AsyncRequest * request);
 77 chip  1.3  
 78            protected:
 79 mday  1.30     virtual Triad<String, String, String> 
 80 kumpf 1.32       _lookupConsumerProvider(const String & destinationPath);
 81 mday  1.30  
 82 sage  1.24     virtual Triad<String, String, String>
 83                    _lookupProviderForClass(const CIMObjectPath & objectPath);
 84            
 85                virtual Triad<String, String, String> _lookupMethodProviderForClass(
 86 kumpf 1.22 	const CIMObjectPath & objectPath,
 87 kumpf 1.28 	const CIMName & methodName);
 88 chip  1.3  
 89 sage  1.17     virtual void _lookupProviderForAssocClass(
 90 karl  1.31         const CIMObjectPath & objectPath,
 91                    const CIMName& assocClassName,
 92                    const CIMName& resultClassName,
 93                    Array<String>& Locations,
 94                    Array<String>& providerNames,
 95 sage  1.24         Array<String>& interfaceNames);
 96 sage  1.17 
 97 chip  1.8  protected:
 98 chip  1.23     //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
 99 chip  1.1  
100 chip  1.8      //void handleStartService();
101                //void handleStopService();
102                //void handlePauseService();
103                //void handleResumeService();
104            
105                static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(void * arg) throw();
106            
107 chip  1.13     //void handleGetClassRequest(const Message * message) throw();
108                //void handleEnumerateClassesRequest(const Message * message) throw();
109                //void handleEnumerateClassNamesRequest(const Message * message) throw();
110                //void handleCreateClassRequest(const Message * message) throw();
111                //void handleModifyClassRequest(const Message * message) throw();
112                //void handleDeleteClassRequest(const Message * message) throw();
113            
114 mday  1.19     void handleGetInstanceRequest(AsyncOpNode *op, const Message *message) throw();
115                void handleEnumerateInstancesRequest(AsyncOpNode *op, const Message *message) throw();
116                void handleEnumerateInstanceNamesRequest(AsyncOpNode *op, const Message *message) throw();
117                void handleCreateInstanceRequest(AsyncOpNode *op, const Message *message) throw();
118                void handleModifyInstanceRequest(AsyncOpNode *op, const Message *message) throw();
119                void handleDeleteInstanceRequest(AsyncOpNode *op, const Message *message) throw();
120            
121                void handleExecuteQueryRequest(AsyncOpNode *op, const Message *message) throw();
122            
123                void handleAssociatorsRequest(AsyncOpNode *op, const Message *message) throw();
124                void handleAssociatorNamesRequest(AsyncOpNode *op, const Message *message) throw();
125                void handleReferencesRequest(AsyncOpNode *op, const Message *message) throw();
126                void handleReferenceNamesRequest(AsyncOpNode *op, const Message *message) throw();
127            
128                void handleGetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
129                void handleSetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
130            
131                void handleInvokeMethodRequest(AsyncOpNode *op, const Message *message) throw();
132            
133                void handleCreateSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
134                void handleModifySubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
135 mday  1.19     void handleDeleteSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
136                void handleEnableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
137                void handleDisableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
138 chip  1.20 
139 mday  1.19     void handleDisableModuleRequest(AsyncOpNode *op, const Message *message) throw();
140                void handleEnableModuleRequest(AsyncOpNode *op, const Message *message) throw();
141 kumpf 1.21     void handleStopAllProvidersRequest(AsyncOpNode *op, const Message *message) throw();
142 kumpf 1.32     void handleExportIndicationRequest(AsyncOpNode *op, 
143 mday  1.30 					const Message *message) throw();
144                
145 mday  1.29 
146                /**
147                    Inserts an entry into the enabled indication providers table.
148            
149                    @param   provider              the provider instance
150                    @param   handler               pointer to the indication response handler
151                */
152            
153                  void _insertEntry(
154            	 const Provider & provider,
155            	 const EnableIndicationsResponseHandler *handler);
156            
157                /**
158                    Generates a String key from by combining the provider and provider
159            	module names.
160            
161                    @param   provider              the provider instance
162            
163                    @return  the generated key
164                 */
165            
166 mday  1.29 
167                  EnableIndicationsResponseHandler * _removeEntry(
168            	 const String & key);
169                  
170                  
171            
172                  String _generateKey (
173            	 const Provider & provider);
174                  
175 chip  1.3  protected:
176 chip  1.8  
177 mday  1.19     SafeQueue<AsyncOpNode *> _incomingQueue;
178 chip  1.13     //SafeQueue<Message *> _outgoingQueue;
179 chip  1.1  
180 chip  1.11     ProviderRegistrationManager * _providerRegistrationManager;
181 mday  1.29     /** Table holding indication response handlers, one for each provider
182            	that has indications enabled.
183                */
184                
185                IndicationResponseTable _responseTable;
186                
187 chip  1.1  };
188 mday  1.30 
189 chip  1.1  
190            PEGASUS_NAMESPACE_END
191            
192            #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2