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