(file) Return to JMPIProviderManager.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / JMPI

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2