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

  1 karl  1.4 //%2003////////////////////////////////////////////////////////////////////////
  2 chip  1.1 //
  3 karl  1.4 // 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           // IBM Corp.; EMC Corporation, The Open Group.
  7 chip  1.1 //
  8           // Permission is hereby granted, free of charge, to any person obtaining a copy
  9           // of this software and associated documentation files (the "Software"), to
 10           // deal in the Software without restriction, including without limitation the
 11           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12           // sell copies of the Software, and to permit persons to whom the Software is
 13           // furnished to do so, subject to the following conditions:
 14 chip  1.5 //
 15 chip  1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23           //
 24           //==============================================================================
 25           //
 26           // Author: Chip Vincent (cvincent@us.ibm.com)
 27           //
 28           // Modified By:
 29           //              Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
 30           //              Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
 31           //              Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
 32           //              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 33           //              Carol Ann Krug Graves, Hewlett-Packard Company
 34           //                (carolann_graves@hp.com)
 35           //              Mike Day, IBM (mdday@us.ibm.com)
 36 schuur 1.6 //              Adrian Schuur, IBM (schuur@de.ibm.com)
 37 kumpf  1.18 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 38 chip   1.1  //
 39             //%/////////////////////////////////////////////////////////////////////////////
 40             
 41             #ifndef Pegasus_ProviderManagerService_h
 42             #define Pegasus_ProviderManagerService_h
 43             
 44             #include <Pegasus/Common/Config.h>
 45             #include <Pegasus/Common/MessageQueueService.h>
 46 kumpf  1.17 #include <Pegasus/Common/CIMMessage.h>
 47             #include <Pegasus/Common/OperationContextInternal.h>
 48 kumpf  1.18 #include <Pegasus/Common/AutoPtr.h>
 49 schuur 1.9  #include <Pegasus/Repository/CIMRepository.h>
 50 kumpf  1.17 #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
 51 chip   1.1  
 52             #include <Pegasus/ProviderManager2/SafeQueue.h>
 53 kumpf  1.18 #include <Pegasus/ProviderManager2/ProviderManagerRouter.h>
 54 chip   1.1  
 55 schuur 1.8  #include <Pegasus/ProviderManager2/Linkage.h>
 56 chip   1.1  
 57             PEGASUS_NAMESPACE_BEGIN
 58 chip   1.5  
 59 schuur 1.14 #define IDLE_LIMIT 300
 60 schuur 1.13 
 61 schuur 1.8  class PEGASUS_PPM_LINKAGE ProviderManagerService : public MessageQueueService
 62 chip   1.1  {
 63 schuur 1.9     friend class CMPIProviderManager;
 64 chip   1.1  public:
 65 schuur 1.6      static ProviderManagerService* providerManagerService;
 66 schuur 1.9  
 67 chip   1.1      ProviderManagerService(void);
 68 schuur 1.9      ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager,
 69                                        CIMRepository * repository);
 70             
 71 chip   1.1  
 72                 virtual ~ProviderManagerService(void);
 73             
 74                 // temp
 75 kumpf  1.20     void unloadIdleProviders();
 76 chip   1.1  
 77 kumpf  1.18     static void indicationCallback(
 78                     CIMProcessIndicationRequestMessage* request);
 79             
 80 chip   1.1  protected:
 81                 virtual Boolean messageOK(const Message * message);
 82                 virtual void handleEnqueue(void);
 83                 virtual void handleEnqueue(Message * message);
 84             
 85                 virtual void _handle_async_request(AsyncRequest * request);
 86 schuur 1.9  
 87 kumpf  1.19     CIMRepository* _repository;
 88 chip   1.1  
 89             private:
 90                 //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
 91             
 92                 //void handleStartService() thorw();
 93                 //void handleStopService() thorw();
 94                 //void handlePauseService() thorw();
 95                 //void handleResumeService() thorw();
 96             
 97 kumpf  1.17     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(
 98                     void * arg) throw();
 99 chip   1.1  
100 kumpf  1.17     void handleCimRequest(AsyncOpNode *op, Message* message);
101             
102 kumpf  1.20     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL
103                     _unloadIdleProvidersHandler(void* arg) throw();
104             
105 kumpf  1.17     ProviderIdContainer _getProviderIdContainer(
106                     const CIMRequestMessage* message);
107             
108                 void _updateProviderModuleStatus(
109                     CIMInstance& providerModule,
110                     Uint16 fromStatus,
111                     Uint16 toStatus);
112 chip   1.1  
113             private:
114                 SafeQueue<AsyncOpNode *> _incomingQueue;
115                 SafeQueue<AsyncOpNode *> _outgoingQueue;
116             
117 kumpf  1.18     ProviderManagerRouter* _providerManagerRouter;
118 chip   1.1  
119 kumpf  1.17     ProviderRegistrationManager* _providerRegistrationManager;
120 kumpf  1.18 
121                 static Uint32 _indicationServiceQueueId;
122 kumpf  1.20 
123                 /**
124                     Indicates the number of threads currently attempting to unload idle
125                     providers.  This value is used to prevent multiple threads from
126                     unloading idle providers at the same time.
127                  */
128                 AtomicInt _unloadIdleProvidersBusy;
129 chip   1.1  };
130             
131             PEGASUS_NAMESPACE_END
132             
133 kumpf  1.17 #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2