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

  1 schuur 1.1 //%2003////////////////////////////////////////////////////////////////////////
  2            //
  3            // 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            // IBM Corp.; EMC Corporation, The Open Group.
  7            //
  8            // Permission is hereby granted, free of charge, to any person obtaining a copy
  9            // of this software and associated documentation files (the "Software"), to
 10            // deal in the Software without restriction, including without limitation the
 11            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12            // sell copies of the Software, and to permit persons to whom the Software is
 13            // furnished to do so, subject to the following conditions:
 14            //
 15            // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22 schuur 1.1 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23            //
 24            //==============================================================================
 25            //
 26            // Author:      Adrian Schuur, schuur@de.ibm.com
 27            //
 28            // Modified By:
 29            //
 30            //%/////////////////////////////////////////////////////////////////////////////
 31            
 32            #ifndef Pegasus_JMPIProviderManager_h
 33            #define Pegasus_JMPIProviderManager_h
 34            
 35            #include <Pegasus/Common/Config.h>
 36            #include <Pegasus/Common/HashTable.h>
 37            #include <Pegasus/ProviderManager2/ProviderRegistrarInitializer.h>
 38            #include <Pegasus/ProviderManager2/ProviderName.h>
 39            #include <Pegasus/ProviderManager2/ProviderManager.h>
 40            #include <Pegasus/Server/Linkage.h>
 41            #include <Pegasus/Config/ConfigManager.h>
 42            #include <Pegasus/Repository/CIMRepository.h>
 43 schuur 1.1 #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
 44 kumpf  1.2 #include <Pegasus/Common/OperationContextInternal.h>
 45 schuur 1.1 
 46            PEGASUS_NAMESPACE_BEGIN
 47            
 48            class CMPI_SelectExp;
 49            
 50            class PEGASUS_SERVER_LINKAGE JMPIProviderManager : public ProviderManager
 51            {
 52            public:
 53                enum Mode { 
 54                   CMPI_MODE,
 55                   CMPI_R_MODE,
 56                   CMPI_O_MODE
 57                };
 58            
 59                Mode getMode() { return mode; }
 60                JMPIProviderManager(Mode=CMPI_MODE);
 61                virtual ~JMPIProviderManager(void);
 62                
 63                virtual Boolean insertProvider(const ProviderName & providerName, 
 64                        const String &ns, const String &cn);
 65              
 66 schuur 1.1     virtual Message * processMessage(Message * request) throw();
 67            
 68                static String resolveFileName(String name);
 69            
 70                virtual void unload_idle_providers(void) ;
 71                
 72               struct indProvRecord {
 73                  indProvRecord() : enabled(false), count(1), handler(NULL) {}
 74                  Boolean enabled;
 75                  int count;
 76                  EnableIndicationsResponseHandler* handler;
 77               };
 78            
 79               struct indSelectRecord {
 80                  indSelectRecord() : eSelx(NULL) {}
 81                  CMPI_SelectExp *eSelx;
 82               };
 83            
 84               typedef HashTable<String,indProvRecord*,  EqualFunc<String>,HashFunc<String> > IndProvTab;
 85               typedef HashTable<String,indSelectRecord*,EqualFunc<String>,HashFunc<String> > IndSelectTab;
 86               typedef HashTable<String,ProviderName,EqualFunc<String>,HashFunc<String> > ProvRegistrar;
 87 schuur 1.1 
 88               static IndProvTab provTab;
 89               static IndSelectTab selxTab;
 90               static ProvRegistrar provReg;
 91               
 92            protected:
 93                Mode mode;
 94                CIMRepository *_repository;
 95                String getFilter(CIMInstance &subscription);
 96            
 97                Message * handleUnsupportedRequest(const Message * message) throw();
 98            
 99                Message * handleGetInstanceRequest(const Message * message) throw();
100                Message * handleEnumerateInstancesRequest(const Message * message) throw();
101                Message * handleEnumerateInstanceNamesRequest(const Message * message) throw();
102                Message * handleCreateInstanceRequest(const Message * message) throw();
103                Message * handleModifyInstanceRequest(const Message * message) throw();
104                Message * handleDeleteInstanceRequest(const Message * message) throw();
105            
106            /*    Message * handleExecuteQueryRequest(const Message * message) throw();
107            
108 schuur 1.1 */    Message * handleAssociatorsRequest(const Message * message) throw();
109                Message * handleAssociatorNamesRequest(const Message * message) throw();
110                Message * handleReferencesRequest(const Message * message) throw();
111                Message * handleReferenceNamesRequest(const Message * message) throw();
112            /*
113                Message * handleGetPropertyRequest(const Message * message) throw();
114                Message * handleSetPropertyRequest(const Message * message) throw();
115            * /
116                Message * handleInvokeMethodRequest(const Message * message) throw();
117            
118                Message * handleCreateSubscriptionRequest(const Message * message) throw();
119            //    Message * handleModifySubscriptionRequest(const Message * message) throw();
120                Message * handleDeleteSubscriptionRequest(const Message * message) throw();
121                Message * handleEnableIndicationsRequest(const Message * message) throw();
122                Message * handleDisableIndicationsRequest(const Message * message) throw();
123            */
124            //  Not supported by CMPI
125            //    Message * handleConsumeIndicationRequest(const Message * message) throw();
126            
127                Message * handleDisableModuleRequest(const Message * message) throw();
128                Message * handleEnableModuleRequest(const Message * message) throw();
129 schuur 1.1     Message * handleStopAllProvidersRequest(const Message * message) throw();
130 kumpf  1.3     Message * handleInitializeProviderRequest(const Message * message);
131 schuur 1.1 
132 kumpf  1.2     ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
133 schuur 1.1 };
134            
135            PEGASUS_NAMESPACE_END
136            
137            #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2