1 chip 1.1 //%//-*-c++-*-//////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to
7 // deal in the Software without restriction, including without limitation the
8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9 // sell copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
13 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
14 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 //
21 //==============================================================================
22 chip 1.1 //
23 // Author: Chip Vincent (cvincent@us.ibm.com)
24 //
25 // Modified By:
26 // Nag Boranna, Hewlett-Packard Company(nagaraja_boranna@hp.com)
27 // Yi Zhou, Hewlett-Packard Company(yi_zhou@hp.com)
28 // Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
29 // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
30 //
31 //%/////////////////////////////////////////////////////////////////////////////
32
33 #ifndef Pegasus_ProviderManagerService_h
34 #define Pegasus_ProviderManagerService_h
35
36 #include <Pegasus/Common/Config.h>
|
37 chip 1.3 #include <Pegasus/Common/Pair.h>
|
38 kumpf 1.7 #include <Pegasus/Common/CIMObjectPath.h>
|
39 chip 1.1 #include <Pegasus/Common/MessageQueueService.h>
|
40 chip 1.3 #include <Pegasus/Common/Thread.h>
|
41 chip 1.6
42 #include <Pegasus/ProviderManager/SafeQueue.h>
|
43 chip 1.1
44 PEGASUS_NAMESPACE_BEGIN
45
|
46 chip 1.3 class ProviderManager;
|
47 kumpf 1.9 class ProviderRegistrationManager;
|
48 chip 1.3
|
49 chip 1.1 class PEGASUS_SERVER_LINKAGE ProviderManagerService : public MessageQueueService
50 {
|
51 chip 1.3 public:
|
52 chip 1.10 ProviderManagerService(ProviderRegistrationManager * providerRegistrationManager);
|
53 chip 1.8 virtual ~ProviderManagerService(void);
|
54 chip 1.3
55 protected:
|
56 chip 1.8 virtual Boolean messageOK(const Message * message);
57 virtual void handleEnqueue(void);
58 virtual void handleEnqueue(Message * message);
59
60 virtual void _handle_async_request(AsyncRequest * request);
|
61 chip 1.3
62 protected:
|
63 chip 1.14 virtual Pair<String, String> _lookupProviderForClass(const CIMObjectPath & objectPath);
|
64 kumpf 1.22 virtual Pair<String, String> _lookupMethodProviderForClass(
65 const CIMObjectPath & objectPath,
66 const String & methodName);
|
67 chip 1.3
|
68 sage 1.17 virtual void _lookupProviderForAssocClass(
69 const CIMObjectPath & objectPath, const String& assocClassName,
70 const String& resultClassName,
71 Array<String>& Locations, Array<String>& providerNames);
72
|
73 chip 1.8 protected:
74 static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleServiceOperation(void * arg) throw();
|
75 chip 1.1
|
76 chip 1.8 //void handleStartService();
77 //void handleStopService();
78 //void handlePauseService();
79 //void handleResumeService();
80
81 static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation(void * arg) throw();
82
|
83 chip 1.13 //void handleGetClassRequest(const Message * message) throw();
84 //void handleEnumerateClassesRequest(const Message * message) throw();
85 //void handleEnumerateClassNamesRequest(const Message * message) throw();
86 //void handleCreateClassRequest(const Message * message) throw();
87 //void handleModifyClassRequest(const Message * message) throw();
88 //void handleDeleteClassRequest(const Message * message) throw();
89
|
90 mday 1.19 void handleGetInstanceRequest(AsyncOpNode *op, const Message *message) throw();
91 void handleEnumerateInstancesRequest(AsyncOpNode *op, const Message *message) throw();
92 void handleEnumerateInstanceNamesRequest(AsyncOpNode *op, const Message *message) throw();
93 void handleCreateInstanceRequest(AsyncOpNode *op, const Message *message) throw();
94 void handleModifyInstanceRequest(AsyncOpNode *op, const Message *message) throw();
95 void handleDeleteInstanceRequest(AsyncOpNode *op, const Message *message) throw();
96
97 void handleExecuteQueryRequest(AsyncOpNode *op, const Message *message) throw();
98
99 void handleAssociatorsRequest(AsyncOpNode *op, const Message *message) throw();
100 void handleAssociatorNamesRequest(AsyncOpNode *op, const Message *message) throw();
101 void handleReferencesRequest(AsyncOpNode *op, const Message *message) throw();
102 void handleReferenceNamesRequest(AsyncOpNode *op, const Message *message) throw();
103
104 void handleGetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
105 void handleSetPropertyRequest(AsyncOpNode *op, const Message *message) throw();
106
107 void handleInvokeMethodRequest(AsyncOpNode *op, const Message *message) throw();
108
109 void handleCreateSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
110 void handleModifySubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
111 mday 1.19 void handleDeleteSubscriptionRequest(AsyncOpNode *op, const Message *message) throw();
112 void handleEnableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
113 void handleDisableIndicationsRequest(AsyncOpNode *op, const Message *message) throw();
|
114 chip 1.20
|
115 mday 1.19 void handleDisableModuleRequest(AsyncOpNode *op, const Message *message) throw();
116 void handleEnableModuleRequest(AsyncOpNode *op, const Message *message) throw();
|
117 kumpf 1.21 void handleStopAllProvidersRequest(AsyncOpNode *op, const Message *message) throw();
|
118 chip 1.12
|
119 chip 1.3 protected:
|
120 chip 1.8 ThreadPool _threadPool;
121
|
122 mday 1.19 SafeQueue<AsyncOpNode *> _incomingQueue;
|
123 chip 1.13 //SafeQueue<Message *> _outgoingQueue;
|
124 chip 1.1
|
125 chip 1.11 ProviderRegistrationManager * _providerRegistrationManager;
|
126 chip 1.14
|
127 chip 1.1 };
128
129 PEGASUS_NAMESPACE_END
130
131 #endif
|