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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2