Create a new provider agent, and start the HTTP server.
The ProviderAgent can be used as a stand alone process by creating a ProviderAgent within a fairly simple main(), or it can be embedded within an existing daemon or service.
A note about the CIMClasses. The ProviderAgent can work in a variety of situations:
1. No classes are available. PA ctor params: classes.empty() && (callbackURL.empty() || configMap[DynamicClassRetrieval_opt] != "true"). A CIMNULL CIMClass will be passed to the providers.
2. All classes are provided initially. PA ctor params: classes contains all the CIM classes which may be needed by the providers. The appropriate class will be passed to the provider as necessary.
3. Classes are retrieved as needed. PA ctor params: !callbackURL.empty() && configMap[DynamicClassRetrieval_opt] == "true". When a request comes in, if the appropriate class cannot be found in the cache, then it will be retrieved from the WBEM server identified by callbackURL.
|configMap ||The configuration parameters for the ProviderAgent and its embedded HTTP server. This could possibly come from parsing a config file. |
|providers ||An array of providers to be embedded in the ProviderAgent. These should be a CppInstanceProvider, CppSecondaryInstanceProvider, CppMethodProvider, or CppAssociatorProvider, or a combination of these. |
|classes ||An array of CIMClasses. If the providers require CIMClasses to be passed into instance and associator calls, the appropriate classes should be placed in this array. The ProviderAgent will look up the appropriate class and pass it to the provider method calls as needed. NULL CIMClasses will be passed if the requested class is not found in the array. This is only a problem is the provider expects a real class. |
|requestHandlers ||An array of request handlers. The appropriate one will be used for each client request depending on the HTTP headers of the request. You can just put a single request handler in the array if you only wish to handle one type of encoding (CIM-XML, for example). |
|authenticator ||A reference to the authenticator to be used by the embedded HTTP server. |
|logger ||A reference to a logger to be used by the ProviderAgent (and passed to the embedded Provider). |
|callbackURL ||A URL to a CIMOM for providers to be able to make "upcalls" to the CIMOM. If the CIMOM requires authentication, the authentication credentials must be in the URL. If no callbackURL is provided, providers will be unable to callback to the CIMOM. |
|locker ||If non-null, this locker will be called to provide seralization for the agent operations. If null, then the config items LockingType_opt and LockingTimeout_opt will be used to control the locking. |
Definition at line 145 of file OW_ProviderAgent.cpp.
References env, logger, m_httpServer, and m_httpThread.