1 karl 1.17 //%2006////////////////////////////////////////////////////////////////////////
|
2 schuur 1.1 //
|
3 karl 1.9 // 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 schuur 1.1 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.9 // 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.10 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.17 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 schuur 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 mark.hamzy 1.18 //
|
21 schuur 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 //%/////////////////////////////////////////////////////////////////////////////
33
|
34 kumpf 1.25 // NOCHKSRC
35
|
36 schuur 1.1 #ifndef Pegasus_JMPIProviderManager_h
37 #define Pegasus_JMPIProviderManager_h
38
39 #include <Pegasus/Common/Config.h>
40 #include <Pegasus/Common/HashTable.h>
41 #include <Pegasus/ProviderManager2/ProviderName.h>
42 #include <Pegasus/ProviderManager2/ProviderManager.h>
43 #include <Pegasus/Server/Linkage.h>
44 #include <Pegasus/Config/ConfigManager.h>
45 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
|
46 kumpf 1.2 #include <Pegasus/Common/OperationContextInternal.h>
|
47 mark.hamzy 1.24 #include <Pegasus/ProviderManager2/JMPI/Linkage.h>
48 #include <Pegasus/ProviderManager2/JMPI/JMPIProvider.h>
|
49 kumpf 1.5 #include <Pegasus/ProviderManager2/JMPI/JMPILocalProviderManager.h>
|
50 konrad.r 1.12 #include <Pegasus/Provider/CIMOMHandleQueryContext.h>
|
51 mark.hamzy 1.21 #include <Pegasus/WQL/WQLSelectStatement.h>
52 #include <Pegasus/WQL/WQLParser.h>
|
53 schuur 1.1
54 PEGASUS_NAMESPACE_BEGIN
55
|
56 mark.hamzy 1.24 class PEGASUS_JMPIPM_LINKAGE JMPIProviderManager : public ProviderManager
|
57 schuur 1.1 {
58 public:
|
59 mark.hamzy 1.22 JMPIProviderManager();
|
60 schuur 1.1 virtual ~JMPIProviderManager(void);
|
61 mark.hamzy 1.14
62 virtual Boolean insertProvider(const ProviderName & providerName,
|
63 schuur 1.1 const String &ns, const String &cn);
|
64 mark.hamzy 1.14
|
65 schuur 1.1 virtual Message * processMessage(Message * request) throw();
66
67 static String resolveFileName(String name);
68
|
69 kumpf 1.5 virtual Boolean hasActiveProviders();
70 virtual void unloadIdleProviders();
|
71 mark.hamzy 1.14
|
72 mark.hamzy 1.19 class indProvRecord
73 {
74 public:
75 indProvRecord ()
76 {
77 enabled = false;
78 count = 0;
79 ctx = NULL;
80 handler = NULL;
81 }
82
83 mutable Mutex mutex;
84 Boolean enabled;
85 int count;
86 OperationContext *ctx;
87 EnableIndicationsResponseHandler *handler;
88 };
89
90 class indSelectRecord
91 {
92 public:
93 mark.hamzy 1.19 indSelectRecord ()
94 {
95 qContext = NULL;
96 }
97
|
98 kumpf 1.25 CIMOMHandleQueryContext *qContext;
|
99 mark.hamzy 1.19 String query;
100 String queryLanguage;
101 CIMPropertyList propertyList;
102 };
103
104 typedef HashTable<String, indProvRecord*, EqualFunc<String>, HashFunc<String> > IndProvTab;
105 typedef HashTable<String, indSelectRecord*, EqualFunc<String>, HashFunc<String> > IndSelectTab;
106 typedef HashTable<String, ProviderName, EqualFunc<String>, HashFunc<String> > ProvRegistrar;
107
108 static Mutex mutexProvTab;
109 static IndProvTab provTab;
110 static Mutex mutexSelxTab;
111 static IndSelectTab selxTab;
112 static Mutex mutexProvReg;
113 static ProvRegistrar provReg;
|
114 mark.hamzy 1.14
|
115 schuur 1.1 protected:
|
116 kumpf 1.5 JMPILocalProviderManager providerManager;
|
117 schuur 1.1
118 Message * handleUnsupportedRequest(const Message * message) throw();
119
120 Message * handleGetInstanceRequest(const Message * message) throw();
121 Message * handleEnumerateInstancesRequest(const Message * message) throw();
|
122 marek 1.26 Message * handleEnumerateInstanceNamesRequest(
123 const Message * message) throw();
|
124 schuur 1.1 Message * handleCreateInstanceRequest(const Message * message) throw();
125 Message * handleModifyInstanceRequest(const Message * message) throw();
126 Message * handleDeleteInstanceRequest(const Message * message) throw();
127
|
128 mark.hamzy 1.15 Message * handleExecQueryRequest(const Message * message) throw();
|
129 schuur 1.1
|
130 mark.hamzy 1.15 Message * handleAssociatorsRequest(const Message * message) throw();
|
131 schuur 1.1 Message * handleAssociatorNamesRequest(const Message * message) throw();
132 Message * handleReferencesRequest(const Message * message) throw();
133 Message * handleReferenceNamesRequest(const Message * message) throw();
|
134 mark.hamzy 1.15
|
135 mark.hamzy 1.16 Message * handleGetPropertyRequest(const Message * message) throw();
136 Message * handleSetPropertyRequest(const Message * message) throw();
|
137 mark.hamzy 1.15
|
138 schuur 1.1 Message * handleInvokeMethodRequest(const Message * message) throw();
|
139 schuur 1.8
|
140 schuur 1.1 Message * handleCreateSubscriptionRequest(const Message * message) throw();
|
141 mark.hamzy 1.15 ////Message * handleModifySubscriptionRequest(const Message * message) throw();
|
142 schuur 1.1 Message * handleDeleteSubscriptionRequest(const Message * message) throw();
|
143 schuur 1.8
|
144 mark.hamzy 1.15 ////Not supported by JMPI
145 ////Message * handleExportIndicationRequest(const Message * message) throw();
|
146 schuur 1.1
147 Message * handleDisableModuleRequest(const Message * message) throw();
148 Message * handleEnableModuleRequest(const Message * message) throw();
149 Message * handleStopAllProvidersRequest(const Message * message) throw();
|
150 carolann.graves 1.11 Message * handleSubscriptionInitCompleteRequest (const Message * message);
|
151 schuur 1.1
|
152 kumpf 1.2 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
|
153 mark.hamzy 1.14
154 private:
155 void debugPrintMethodPointers (JNIEnv *env, jclass jc);
|
156 mark.hamzy 1.18 bool getInterfaceType (ProviderIdContainer pidc,
157 String& interfaceType,
158 String& interfaceVersion);
159 bool interfaceIsUsed (JNIEnv *env,
160 jobject jObject,
161 String searchInterfaceName);
|
162 mark.hamzy 1.14
163 static int trace;
|
164 schuur 1.1 };
165
166 PEGASUS_NAMESPACE_END
167
168 #endif
|