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

  1 karl  1.25 //%2004////////////////////////////////////////////////////////////////////////
  2 chip  1.1  //
  3 karl  1.25 // 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.4  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.25 // 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 karl  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            //              Carol Ann Krug Graves, Hewlett-Packard Company
 36            //                (carolann_graves@hp.com)
 37            //              Mike Day, IBM (mdday@us.ibm.com)
 38 schuur 1.6  //              Adrian Schuur, IBM (schuur@de.ibm.com)
 39 kumpf  1.18 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 40 chip   1.1  //
 41             //%/////////////////////////////////////////////////////////////////////////////
 42             
 43             #ifndef Pegasus_ProviderManagerService_h
 44             #define Pegasus_ProviderManagerService_h
 45             
 46             #include <Pegasus/Common/Config.h>
 47             #include <Pegasus/Common/MessageQueueService.h>
 48 kumpf  1.17 #include <Pegasus/Common/CIMMessage.h>
 49             #include <Pegasus/Common/OperationContextInternal.h>
 50 kumpf  1.18 #include <Pegasus/Common/AutoPtr.h>
 51 schuur 1.9  #include <Pegasus/Repository/CIMRepository.h>
 52 kumpf  1.17 #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
 53 chip   1.1  
 54             #include <Pegasus/ProviderManager2/SafeQueue.h>
 55 kumpf  1.18 #include <Pegasus/ProviderManager2/ProviderManagerRouter.h>
 56 chip   1.1  
 57 schuur 1.8  #include <Pegasus/ProviderManager2/Linkage.h>
 58 chip   1.1  
 59             PEGASUS_NAMESPACE_BEGIN
 60 chip   1.5  
 61 schuur 1.14 #define IDLE_LIMIT 300
 62 schuur 1.13 
 63 schuur 1.8  class PEGASUS_PPM_LINKAGE ProviderManagerService : public MessageQueueService
 64 chip   1.1  {
 65 schuur 1.9     friend class CMPIProviderManager;
 66 chip   1.1  public:
 67 schuur 1.6      static ProviderManagerService* providerManagerService;
 68 schuur 1.9  
 69 chip   1.1      ProviderManagerService(void);
 70 schuur 1.9      ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager,
 71                                        CIMRepository * repository);
 72             
 73 chip   1.1  
 74                 virtual ~ProviderManagerService(void);
 75             
 76                 // temp
 77 kumpf  1.20     void unloadIdleProviders();
 78 chip   1.1  
 79 schuur 1.21     static void indicationCallback(CIMProcessIndicationRequestMessage* request);
 80 brian.campbell 1.26     static void handleCimResponse(CIMRequestMessage &request,
 81                     																	CIMResponseMessage &response);
 82 schuur         1.21 
 83 chip           1.1  protected:
 84                         virtual Boolean messageOK(const Message * message);
 85                         virtual void handleEnqueue(void);
 86                         virtual void handleEnqueue(Message * message);
 87                     
 88                         virtual void _handle_async_request(AsyncRequest * request);
 89 schuur         1.9  
 90 kumpf          1.22     CIMRepository* _repository;
 91 chip           1.1  
 92                     private:
 93                         //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
 94                     
 95                         //void handleStartService() thorw();
 96                         //void handleStopService() thorw();
 97                         //void handlePauseService() thorw();
 98                         //void handleResumeService() thorw();
 99                     
100 kumpf          1.17     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(
101 se.gupta       1.24         void * arg) ;
102 chip           1.1  
103 kumpf          1.17     void handleCimRequest(AsyncOpNode *op, Message* message);
104                     
105 kumpf          1.20     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL
106                             _unloadIdleProvidersHandler(void* arg) throw();
107                     
108 kumpf          1.17     void _updateProviderModuleStatus(
109                             CIMInstance& providerModule,
110                             Uint16 fromStatus,
111                             Uint16 toStatus);
112 chip           1.1  
113                         SafeQueue<AsyncOpNode *> _incomingQueue;
114                         SafeQueue<AsyncOpNode *> _outgoingQueue;
115                     
116 kumpf          1.18     ProviderManagerRouter* _providerManagerRouter;
117 chip           1.1  
118 kumpf          1.17     ProviderRegistrationManager* _providerRegistrationManager;
119 kumpf          1.18 
120                         static Uint32 _indicationServiceQueueId;
121 kumpf          1.20 
122                         /**
123                             Indicates the number of threads currently attempting to unload idle
124                             providers.  This value is used to prevent multiple threads from
125                             unloading idle providers at the same time.
126                          */
127                         AtomicInt _unloadIdleProvidersBusy;
128 chip           1.1  };
129                     
130                     PEGASUS_NAMESPACE_END
131                     
132 kumpf          1.17 #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2