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 schuur 1.9 #include <Pegasus/Repository/CIMRepository.h>
|
56 kumpf 1.17 #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
|
57 chip 1.1
58 #include <Pegasus/ProviderManager2/SafeQueue.h>
|
59 kumpf 1.18 #include <Pegasus/ProviderManager2/ProviderManagerRouter.h>
|
60 chip 1.1
|
61 schuur 1.8 #include <Pegasus/ProviderManager2/Linkage.h>
|
62 chip 1.1
63 PEGASUS_NAMESPACE_BEGIN
|
64 chip 1.5
|
65 schuur 1.14 #define IDLE_LIMIT 300
|
66 schuur 1.13
|
67 schuur 1.8 class PEGASUS_PPM_LINKAGE ProviderManagerService : public MessageQueueService
|
68 chip 1.1 {
69 public:
|
70 kumpf 1.27 ProviderManagerService(
71 ProviderRegistrationManager* providerRegistrationManager,
72 CIMRepository* repository);
|
73 schuur 1.9
|
74 kumpf 1.27 virtual ~ProviderManagerService();
|
75 chip 1.1
|
76 kumpf 1.20 void unloadIdleProviders();
|
77 chip 1.1
|
78 schuur 1.21 static void indicationCallback(CIMProcessIndicationRequestMessage* request);
|
79 kumpf 1.32 static void responseChunkCallback(
80 CIMRequestMessage* request, CIMResponseMessage* response);
|
81 schuur 1.21
|
82 carolann.graves 1.33 /**
83 Callback function to be called upon detection of failure of a
84 provider module.
85 */
86 static void providerModuleFailureCallback (const String & moduleName,
87 const String & userName, Uint16);
88
|
89 kumpf 1.27 private:
90 ProviderManagerService();
|
91 chip 1.1
|
92 kumpf 1.27 virtual Boolean messageOK(const Message* message);
93 virtual void handleEnqueue();
94 virtual void handleEnqueue(Message* message);
|
95 schuur 1.9
|
96 kumpf 1.27 virtual void _handle_async_request(AsyncRequest* request);
|
97 chip 1.1
|
98 kumpf 1.27 static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(
99 void* arg) ;
|
100 chip 1.1
|
101 kumpf 1.27 void handleCimRequest(AsyncOpNode* op, Message* message);
|
102 chip 1.1
|
103 kumpf 1.27 Message* _processMessage(CIMRequestMessage* request);
|
104 kumpf 1.17
|
105 kumpf 1.20 static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL
106 _unloadIdleProvidersHandler(void* arg) throw();
107
|
108 kumpf 1.17 void _updateProviderModuleStatus(
109 CIMInstance& providerModule,
|
110 carolann.graves 1.34 const Array<Uint16>& removeStatus,
111 const Array<Uint16>& appendStatus);
|
112 chip 1.1
|
113 kumpf 1.27 static ProviderManagerService* providerManagerService;
114
115 CIMRepository* _repository;
116
|
117 chip 1.1 SafeQueue<AsyncOpNode *> _incomingQueue;
118 SafeQueue<AsyncOpNode *> _outgoingQueue;
119
|
120 kumpf 1.27 ProviderManagerRouter* _basicProviderManagerRouter;
121 ProviderManagerRouter* _oopProviderManagerRouter;
|
122 chip 1.1
|
123 kumpf 1.17 ProviderRegistrationManager* _providerRegistrationManager;
|
124 kumpf 1.18
125 static Uint32 _indicationServiceQueueId;
|
126 kumpf 1.20
127 /**
128 Indicates the number of threads currently attempting to unload idle
129 providers. This value is used to prevent multiple threads from
130 unloading idle providers at the same time.
131 */
132 AtomicInt _unloadIdleProvidersBusy;
|
133 konrad.r 1.28
134
|
135 chip 1.1 };
136
137 PEGASUS_NAMESPACE_END
138
|
139 kumpf 1.17 #endif
|