version 1.34, 2006/05/19 17:38:18
|
version 1.39, 2006/08/09 21:13:00
|
|
|
#include <Pegasus/Common/CIMMessage.h> | #include <Pegasus/Common/CIMMessage.h> |
#include <Pegasus/Common/OperationContextInternal.h> | #include <Pegasus/Common/OperationContextInternal.h> |
#include <Pegasus/Common/AutoPtr.h> | #include <Pegasus/Common/AutoPtr.h> |
|
#include <Pegasus/Common/List.h> |
|
#include <Pegasus/Common/Mutex.h> |
#include <Pegasus/Repository/CIMRepository.h> | #include <Pegasus/Repository/CIMRepository.h> |
#include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h> | #include <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h> |
| |
#include <Pegasus/ProviderManager2/SafeQueue.h> |
|
#include <Pegasus/ProviderManager2/ProviderManagerRouter.h> | #include <Pegasus/ProviderManager2/ProviderManagerRouter.h> |
| |
#include <Pegasus/ProviderManager2/Linkage.h> | #include <Pegasus/ProviderManager2/Linkage.h> |
| |
|
#ifdef PEGASUS_ZOS_SECURITY |
|
// This include file will not be provided in the OpenGroup CVS for now. |
|
// Do NOT try to include it in your compile |
|
#include <Pegasus/ProviderManager2/ProviderManagerzOS_inline.h> |
|
#endif |
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
#define IDLE_LIMIT 300 | #define IDLE_LIMIT 300 |
|
|
public: | public: |
ProviderManagerService( | ProviderManagerService( |
ProviderRegistrationManager* providerRegistrationManager, | ProviderRegistrationManager* providerRegistrationManager, |
CIMRepository* repository); |
CIMRepository* repository, |
|
ProviderManager* (*createDefaultProviderManagerCallback)()); |
| |
virtual ~ProviderManagerService(); | virtual ~ProviderManagerService(); |
| |
|
|
| |
virtual void _handle_async_request(AsyncRequest* request); | virtual void _handle_async_request(AsyncRequest* request); |
| |
static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL handleCimOperation( |
static ThreadReturnType PEGASUS_THREAD_CDECL handleCimOperation( |
void* arg) ; | void* arg) ; |
| |
void handleCimRequest(AsyncOpNode* op, Message* message); | void handleCimRequest(AsyncOpNode* op, Message* message); |
| |
Message* _processMessage(CIMRequestMessage* request); | Message* _processMessage(CIMRequestMessage* request); |
| |
static PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL |
static ThreadReturnType PEGASUS_THREAD_CDECL |
_unloadIdleProvidersHandler(void* arg) throw(); | _unloadIdleProvidersHandler(void* arg) throw(); |
| |
void _updateProviderModuleStatus( | void _updateProviderModuleStatus( |
|
|
| |
CIMRepository* _repository; | CIMRepository* _repository; |
| |
SafeQueue<AsyncOpNode *> _incomingQueue; |
List<AsyncOpNode,Mutex> _incomingQueue; |
SafeQueue<AsyncOpNode *> _outgoingQueue; |
List<AsyncOpNode,Mutex> _outgoingQueue; |
| |
|
Boolean _forceProviderProcesses; |
ProviderManagerRouter* _basicProviderManagerRouter; | ProviderManagerRouter* _basicProviderManagerRouter; |
ProviderManagerRouter* _oopProviderManagerRouter; | ProviderManagerRouter* _oopProviderManagerRouter; |
| |
|
|
| |
}; | }; |
| |
|
// Auto class to encapsulate enabling and disabling |
|
// of the pthread_security on z/OS |
|
// For all other platforms this should be an empty class |
|
// Targets: avoid ifdefs and keep code readable(clean) |
|
#ifndef PEGASUS_ZOS_THREADLEVEL_SECURITY |
|
// not z/OS == empty class |
|
class PEGASUS_PPM_LINKAGE AutoPThreadSecurity |
|
{ |
|
public: |
|
AutoPThreadSecurity(const OperationContext& context) {}; |
|
}; |
|
#else |
|
|
|
class PEGASUS_PPM_LINKAGE AutoPThreadSecurity |
|
{ |
|
public: |
|
AutoPThreadSecurity(const OperationContext& context) |
|
{ |
|
int err_num=enablePThreadSecurity(context); |
|
if (err_num!=0) |
|
{ |
|
// need a new CIMException for this |
|
throw CIMException(CIM_ERR_ACCESS_DENIED,String(strerror(err_num))); |
|
} |
|
}; |
|
|
|
~AutoPThreadSecurity() |
|
{ |
|
disablePThreadSecurity(); |
|
}; |
|
}; |
|
|
|
#endif |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif | #endif |