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

  1 martin 1.5 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.6 //
  3 martin 1.5 // Licensed to The Open Group (TOG) under one or more contributor license
  4            // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5            // this work for additional information regarding copyright ownership.
  6            // Each contributor licenses this file to you under the OpenPegasus Open
  7            // Source License; you may not use this file except in compliance with the
  8            // License.
  9 martin 1.6 //
 10 martin 1.5 // Permission is hereby granted, free of charge, to any person obtaining a
 11            // copy of this software and associated documentation files (the "Software"),
 12            // to deal in the Software without restriction, including without limitation
 13            // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14            // and/or sell copies of the Software, and to permit persons to whom the
 15            // Software is furnished to do so, subject to the following conditions:
 16 martin 1.6 //
 17 martin 1.5 // The above copyright notice and this permission notice shall be included
 18            // in all copies or substantial portions of the Software.
 19 martin 1.6 //
 20 martin 1.5 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.6 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.5 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23            // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24            // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25            // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26            // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.6 //
 28 martin 1.5 //////////////////////////////////////////////////////////////////////////
 29 kumpf  1.1 //
 30            //%/////////////////////////////////////////////////////////////////////////////
 31            
 32            #ifndef Pegasus_ProviderManagerService_h
 33            #define Pegasus_ProviderManagerService_h
 34            
 35            #include <Pegasus/Common/Config.h>
 36            #include <Pegasus/Common/MessageQueueService.h>
 37            #include <Pegasus/Common/CIMMessage.h>
 38            #include <Pegasus/Common/OperationContextInternal.h>
 39            #include <Pegasus/Common/AutoPtr.h>
 40            #include <Pegasus/Common/List.h>
 41            #include <Pegasus/Common/Mutex.h>
 42            #include <Pegasus/Repository/CIMRepository.h>
 43 kumpf  1.3 #include \
 44                <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
 45 kumpf  1.2 #include <Pegasus/ProviderManager2/ProviderManager.h>
 46 s.kodali 1.10 #include <Pegasus/ProviderManagerRouter/ProviderManagerRouter.h>
 47 kumpf    1.1  #include <Pegasus/ProviderManagerService/Linkage.h>
 48               
 49               PEGASUS_NAMESPACE_BEGIN
 50               
 51               class PEGASUS_PMS_LINKAGE ProviderManagerService : public MessageQueueService
 52               {
 53               public:
 54                   ProviderManagerService(
 55                       ProviderRegistrationManager* providerRegistrationManager,
 56                       CIMRepository* repository,
 57 kumpf    1.3          ProviderManager* (*createDefaultProviderManagerCallback)());
 58 kumpf    1.1  
 59                   virtual ~ProviderManagerService();
 60               
 61 sahana.prabhakar 1.8      void idleTimeCleanup();
 62 kumpf            1.1  
 63                           static void indicationCallback(CIMProcessIndicationRequestMessage* request);
 64                           static void responseChunkCallback(
 65                               CIMRequestMessage* request, CIMResponseMessage* response);
 66 sahana.prabhakar 1.8      static void asyncResponseCallback(
 67                               CIMRequestMessage* request, CIMResponseMessage* response);
 68 kumpf            1.1  
 69                           /**
 70                               Callback function to be called upon detection of failure of a
 71                               provider module.
 72                            */
 73 s.kodali         1.10     static void providerModuleGroupFailureCallback(
 74                               const String &groupName,
 75                               const String & userName,
 76                               Uint16 userContext,
 77                               Boolean isGroup);
 78 kumpf            1.1  
 79                       private:
 80                           ProviderManagerService();
 81                       
 82                           virtual void handleEnqueue();
 83                           virtual void handleEnqueue(Message* message);
 84                       
 85                           virtual void _handle_async_request(AsyncRequest* request);
 86                       
 87                           static ThreadReturnType PEGASUS_THREAD_CDECL handleCimOperation(
 88                               void* arg) ;
 89                       
 90                           void handleCimRequest(AsyncOpNode* op, Message* message);
 91                       
 92                           Message* _processMessage(CIMRequestMessage* request);
 93                       
 94                           static ThreadReturnType PEGASUS_THREAD_CDECL
 95 sahana.prabhakar 1.8          _idleTimeCleanupHandler(void* arg) throw();
 96                       
 97                           void _updateModuleStatusToEnabled(
 98                               CIMEnableModuleResponseMessage *emResp,
 99                               CIMInstance &providerModule);
100                       
101                           void _updateModuleStatusToDisabled(
102                               CIMDisableModuleResponseMessage *dmResp,
103                               CIMInstance &providerModule);
104 kumpf            1.1  
105                           void _updateProviderModuleStatus(
106                               CIMInstance& providerModule,
107                               const Array<Uint16>& removeStatus,
108                               const Array<Uint16>& appendStatus);
109                       
110 venkat.puvvada   1.9      static void _invokeProviderModuleStartMethod(
111                               const CIMObjectPath &ref);
112                       
113 s.kodali         1.10     static void _reconcileProviderModuleFailure(
114                               const String &moduleName,
115                               const String & userName,
116                               Uint16 userContext);
117                       
118 venkat.puvvada   1.11     void _handleIndicationDeliveryResponse(Message *message);
119                           static void _indicationDeliveryRoutine(
120                               CIMProcessIndicationRequestMessage* request);
121                       
122 kumpf            1.1      static ProviderManagerService* providerManagerService;
123                       
124                           CIMRepository* _repository;
125                       
126                           List<AsyncOpNode,Mutex> _incomingQueue;
127                           List<AsyncOpNode,Mutex> _outgoingQueue;
128                       
129                           Boolean _forceProviderProcesses;
130                           ProviderManagerRouter* _basicProviderManagerRouter;
131                           ProviderManagerRouter* _oopProviderManagerRouter;
132                       
133 s.kodali         1.10     static ProviderRegistrationManager* _providerRegistrationManager;
134 kumpf            1.1  
135 venkat.puvvada   1.9  
136 kumpf            1.7      static Boolean _allProvidersStopped;
137 kumpf            1.1      static Uint32 _indicationServiceQueueId;
138                       
139                           /**
140 sahana.prabhakar 1.8          Indicates the number of threads currently attempting to cleanup idle
141                               providers and clean disconnected client requests.  This value is used 
142                               to prevent multiple threads from initiating cleanup the same time.
143 kumpf            1.1       */
144 sahana.prabhakar 1.8      AtomicInt _idleTimeCleanupBusy;
145 kumpf            1.1  };
146                       
147                       PEGASUS_NAMESPACE_END
148                       
149                       #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2