(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             public:
 66 kumpf  1.27     ProviderManagerService(
 67                     ProviderRegistrationManager* providerRegistrationManager,
 68                     CIMRepository* repository);
 69 schuur 1.9  
 70 kumpf  1.27     virtual ~ProviderManagerService();
 71 chip   1.1  
 72 kumpf  1.20     void unloadIdleProviders();
 73 chip   1.1  
 74 schuur 1.21     static void indicationCallback(CIMProcessIndicationRequestMessage* request);
 75 kumpf  1.27     static void handleCimResponse(
 76                     CIMRequestMessage& request, CIMResponseMessage& response);
 77 schuur 1.21 
 78 kumpf  1.27 private:
 79                 ProviderManagerService();
 80 chip   1.1  
 81 kumpf  1.27     virtual Boolean messageOK(const Message* message);
 82                 virtual void handleEnqueue();
 83                 virtual void handleEnqueue(Message* message);
 84 schuur 1.9  
 85 kumpf  1.27     virtual void _handle_async_request(AsyncRequest* request);
 86 chip   1.1  
 87 kumpf  1.27     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(
 88                     void* arg) ;
 89 chip   1.1  
 90 kumpf  1.27     void handleCimRequest(AsyncOpNode* op, Message* message);
 91 chip   1.1  
 92 kumpf  1.27     Message* _processMessage(CIMRequestMessage* request);
 93 kumpf  1.17 
 94 kumpf  1.20     static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL
 95                     _unloadIdleProvidersHandler(void* arg) throw();
 96             
 97 kumpf  1.17     void _updateProviderModuleStatus(
 98                     CIMInstance& providerModule,
 99                     Uint16 fromStatus,
100                     Uint16 toStatus);
101 chip   1.1  
102 kumpf  1.27     static ProviderManagerService* providerManagerService;
103             
104                 CIMRepository* _repository;
105             
106 chip   1.1      SafeQueue<AsyncOpNode *> _incomingQueue;
107                 SafeQueue<AsyncOpNode *> _outgoingQueue;
108             
109 kumpf  1.27     ProviderManagerRouter* _basicProviderManagerRouter;
110                 ProviderManagerRouter* _oopProviderManagerRouter;
111 chip   1.1  
112 kumpf  1.17     ProviderRegistrationManager* _providerRegistrationManager;
113 kumpf  1.18 
114                 static Uint32 _indicationServiceQueueId;
115 kumpf  1.20 
116                 /**
117                     Indicates the number of threads currently attempting to unload idle
118                     providers.  This value is used to prevent multiple threads from
119                     unloading idle providers at the same time.
120                  */
121                 AtomicInt _unloadIdleProvidersBusy;
122 chip   1.1  };
123             
124             PEGASUS_NAMESPACE_END
125             
126 kumpf  1.17 #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2