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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2