1 a.dunfey 1.16.8.1 //%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 a.dunfey 1.16.8.1 // 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 a.dunfey 1.16.8.2 //
|
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 // Author: Adrian Schuur, schuur@de.ibm.com
33 //
34 // Modified By:
35 //
36 //%/////////////////////////////////////////////////////////////////////////////
37
38 #ifndef Pegasus_JMPIProviderManager_h
39 #define Pegasus_JMPIProviderManager_h
40
41 #include <Pegasus/Common/Config.h>
42 schuur 1.1 #include <Pegasus/Common/HashTable.h>
43 #include <Pegasus/ProviderManager2/ProviderRegistrarInitializer.h>
44 #include <Pegasus/ProviderManager2/ProviderName.h>
45 #include <Pegasus/ProviderManager2/ProviderManager.h>
46 #include <Pegasus/Server/Linkage.h>
47 #include <Pegasus/Config/ConfigManager.h>
48 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
|
49 kumpf 1.2 #include <Pegasus/Common/OperationContextInternal.h>
|
50 kumpf 1.5 #include <Pegasus/ProviderManager2/JMPI/JMPILocalProviderManager.h>
|
51 konrad.r 1.12 #include <Pegasus/Provider/CIMOMHandleQueryContext.h>
|
52 schuur 1.1
53 PEGASUS_NAMESPACE_BEGIN
54
|
55 konrad.r 1.13 struct CMPI_SelectExp;
|
56 schuur 1.1
57 class PEGASUS_SERVER_LINKAGE JMPIProviderManager : public ProviderManager
58 {
59 public:
|
60 mark.hamzy 1.14 enum Mode {
|
61 schuur 1.1 CMPI_MODE,
62 CMPI_R_MODE,
63 CMPI_O_MODE
64 };
65
66 Mode getMode() { return mode; }
67 JMPIProviderManager(Mode=CMPI_MODE);
68 virtual ~JMPIProviderManager(void);
|
69 mark.hamzy 1.14
70 virtual Boolean insertProvider(const ProviderName & providerName,
|
71 schuur 1.1 const String &ns, const String &cn);
|
72 mark.hamzy 1.14
|
73 schuur 1.1 virtual Message * processMessage(Message * request) throw();
74
75 static String resolveFileName(String name);
76
|
77 kumpf 1.5 virtual Boolean hasActiveProviders();
78 virtual void unloadIdleProviders();
|
79 mark.hamzy 1.14
|
80 schuur 1.1 struct indProvRecord {
|
81 schuur 1.8 indProvRecord() : enabled(false), count(1), handler(NULL), ctx(NULL) {}
|
82 schuur 1.1 Boolean enabled;
83 int count;
84 EnableIndicationsResponseHandler* handler;
|
85 schuur 1.8 OperationContext* ctx;
|
86 schuur 1.1 };
87
|
88 schuur 1.8
|
89 schuur 1.1 struct indSelectRecord {
90 indSelectRecord() : eSelx(NULL) {}
91 CMPI_SelectExp *eSelx;
|
92 konrad.r 1.12 CIMOMHandleQueryContext *qContext;
|
93 schuur 1.1 };
94
95 typedef HashTable<String,indProvRecord*, EqualFunc<String>,HashFunc<String> > IndProvTab;
96 typedef HashTable<String,indSelectRecord*,EqualFunc<String>,HashFunc<String> > IndSelectTab;
97 typedef HashTable<String,ProviderName,EqualFunc<String>,HashFunc<String> > ProvRegistrar;
98
99 static IndProvTab provTab;
100 static IndSelectTab selxTab;
101 static ProvRegistrar provReg;
|
102 mark.hamzy 1.14
|
103 schuur 1.1 protected:
|
104 kumpf 1.5 JMPILocalProviderManager providerManager;
|
105 schuur 1.1 Mode mode;
106
107 Message * handleUnsupportedRequest(const Message * message) throw();
108
109 Message * handleGetInstanceRequest(const Message * message) throw();
110 Message * handleEnumerateInstancesRequest(const Message * message) throw();
111 Message * handleEnumerateInstanceNamesRequest(const Message * message) throw();
112 Message * handleCreateInstanceRequest(const Message * message) throw();
113 Message * handleModifyInstanceRequest(const Message * message) throw();
114 Message * handleDeleteInstanceRequest(const Message * message) throw();
115
|
116 mark.hamzy 1.15 Message * handleExecQueryRequest(const Message * message) throw();
|
117 schuur 1.1
|
118 mark.hamzy 1.15 Message * handleAssociatorsRequest(const Message * message) throw();
|
119 schuur 1.1 Message * handleAssociatorNamesRequest(const Message * message) throw();
120 Message * handleReferencesRequest(const Message * message) throw();
121 Message * handleReferenceNamesRequest(const Message * message) throw();
|
122 mark.hamzy 1.15
|
123 mark.hamzy 1.16 Message * handleGetPropertyRequest(const Message * message) throw();
124 Message * handleSetPropertyRequest(const Message * message) throw();
|
125 mark.hamzy 1.15
|
126 schuur 1.1 Message * handleInvokeMethodRequest(const Message * message) throw();
|
127 schuur 1.8
|
128 schuur 1.1 Message * handleCreateSubscriptionRequest(const Message * message) throw();
|
129 mark.hamzy 1.15 ////Message * handleModifySubscriptionRequest(const Message * message) throw();
|
130 schuur 1.1 Message * handleDeleteSubscriptionRequest(const Message * message) throw();
|
131 schuur 1.8
|
132 mark.hamzy 1.15 ////Not supported by JMPI
133 ////Message * handleExportIndicationRequest(const Message * message) throw();
|
134 schuur 1.1
135 Message * handleDisableModuleRequest(const Message * message) throw();
136 Message * handleEnableModuleRequest(const Message * message) throw();
137 Message * handleStopAllProvidersRequest(const Message * message) throw();
|
138 kumpf 1.3 Message * handleInitializeProviderRequest(const Message * message);
|
139 carolann.graves 1.11 Message * handleSubscriptionInitCompleteRequest (const Message * message);
|
140 schuur 1.1
|
141 kumpf 1.2 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
|
142 mark.hamzy 1.14
143 private:
144 void debugPrintMethodPointers (JNIEnv *env, jclass jc);
|
145 a.dunfey 1.16.8.2 bool getInterfaceType (ProviderIdContainer pidc,
146 String& interfaceType,
147 String& interfaceVersion);
148 bool interfaceIsUsed (JNIEnv *env,
149 jobject jObject,
150 String searchInterfaceName);
|
151 mark.hamzy 1.14
152 static int trace;
|
153 schuur 1.1 };
154
155 PEGASUS_NAMESPACE_END
156
157 #endif
|