(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             
 81 chip   1.1  protected:
 82                 virtual Boolean messageOK(const Message * message);
 83                 virtual void handleEnqueue(void);
 84                 virtual void handleEnqueue(Message * message);
 85             
 86                 virtual void _handle_async_request(AsyncRequest * request);
 87 schuur 1.9  
 88 kumpf  1.22     CIMRepository* _repository;
 89 chip   1.1  
 90             private:
 91                 //static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
 92             
 93                 //void handleStartService() thorw();
 94                 //void handleStopService() thorw();
 95                 //void handlePauseService() thorw();
 96                 //void handleResumeService() thorw();
 97             
 98 kumpf  1.17     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(
 99 se.gupta 1.24         void * arg) ;
100 chip     1.1  
101 kumpf    1.17     void handleCimRequest(AsyncOpNode *op, Message* message);
102               
103 kumpf    1.20     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL
104                       _unloadIdleProvidersHandler(void* arg) throw();
105               
106 kumpf    1.17     void _updateProviderModuleStatus(
107                       CIMInstance& providerModule,
108                       Uint16 fromStatus,
109                       Uint16 toStatus);
110 chip     1.1  
111               private:
112                   SafeQueue<AsyncOpNode *> _incomingQueue;
113                   SafeQueue<AsyncOpNode *> _outgoingQueue;
114               
115 kumpf    1.18     ProviderManagerRouter* _providerManagerRouter;
116 chip     1.1  
117 kumpf    1.17     ProviderRegistrationManager* _providerRegistrationManager;
118 kumpf    1.18 
119                   static Uint32 _indicationServiceQueueId;
120 kumpf    1.20 
121                   /**
122                       Indicates the number of threads currently attempting to unload idle
123                       providers.  This value is used to prevent multiple threads from
124                       unloading idle providers at the same time.
125                    */
126                   AtomicInt _unloadIdleProvidersBusy;
127 chip     1.1  };
128               
129               PEGASUS_NAMESPACE_END
130               
131 kumpf    1.17 #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2