version 1.56.2.2, 2006/03/07 18:45:58
|
version 1.57, 2006/01/11 20:44:29
|
|
|
//%2006//////////////////////////////////////////////////////////////////////// |
//%2005//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
|
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
#include <Pegasus/ProviderManager2/ProviderManagerService.h> | #include <Pegasus/ProviderManager2/ProviderManagerService.h> |
#include <Pegasus/ProviderManager2/ProviderType.h> | #include <Pegasus/ProviderManager2/ProviderType.h> |
| |
#define HandleCatch(handler) \ |
|
catch(CIMException & e) \ |
|
{ \ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, \ |
|
"Exception: " + e.getMessage()); \ |
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); \ |
|
} \ |
|
catch(Exception & e) \ |
|
{ \ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, \ |
|
"Exception: " + e.getMessage()); \ |
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage());\ |
|
} \ |
|
catch(...) \ |
|
{ \ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, \ |
|
"Exception: Unknown"); \ |
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); \ |
|
} \ |
|
STAT_RESPONSEEND |
|
|
|
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
// auto variable to protect provider during operations | // auto variable to protect provider during operations |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
OperationResponseHandler handler( |
OperationResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
GetInstanceResponseHandler handler( |
GetInstanceResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().getInstance( | ph.GetProvider().getInstance( |
context, | context, |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
propertyList, | propertyList, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
EnumerateInstancesResponseHandler handler( |
EnumerateInstancesResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().enumerateInstances( | ph.GetProvider().enumerateInstances( |
context, | context, |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
propertyList, | propertyList, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
EnumerateInstanceNamesResponseHandler handler( |
EnumerateInstanceNamesResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
// process the request | // process the request |
try | try |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().enumerateInstanceNames( | ph.GetProvider().enumerateInstanceNames( |
context, | context, |
objectPath, | objectPath, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
CreateInstanceResponseHandler handler( |
CreateInstanceResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().createInstance( | ph.GetProvider().createInstance( |
context, | context, |
objectPath, | objectPath, |
request->newInstance, | request->newInstance, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
ModifyInstanceResponseHandler handler( |
ModifyInstanceResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().modifyInstance( | ph.GetProvider().modifyInstance( |
context, | context, |
|
|
request->includeQualifiers, | request->includeQualifiers, |
propertyList, | propertyList, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
DeleteInstanceResponseHandler handler( |
DeleteInstanceResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().deleteInstance( | ph.GetProvider().deleteInstance( |
context, | context, |
objectPath, | objectPath, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
ExecQueryResponseHandler handler( |
ExecQueryResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
ph.GetProvider().execQuery( | ph.GetProvider().execQuery( |
context, | context, |
objectPath, | objectPath, |
qx, | qx, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
AssociatorsResponseHandler handler( |
AssociatorsResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
// process the request | // process the request |
try | try |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
ph.GetProvider().associators( | ph.GetProvider().associators( |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
request->propertyList, | request->propertyList, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
AssociatorNamesResponseHandler handler( |
AssociatorNamesResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
// process the request | // process the request |
try | try |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
pm_service_op_lock op_lock(&ph.GetProvider()); | pm_service_op_lock op_lock(&ph.GetProvider()); |
| |
ph.GetProvider().associatorNames( | ph.GetProvider().associatorNames( |
|
|
request->role, | request->role, |
request->resultRole, | request->resultRole, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
ReferencesResponseHandler handler( |
ReferencesResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
// process the request | // process the request |
try | try |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.references: " + | "Calling provider.references: " + |
|
|
request->includeClassOrigin, | request->includeClassOrigin, |
request->propertyList, | request->propertyList, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
ReferenceNamesResponseHandler handler( |
ReferenceNamesResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
// process the request | // process the request |
try | try |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.referenceNames: " + | "Calling provider.referenceNames: " + |
|
|
request->resultClass, | request->resultClass, |
request->role, | request->role, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
GetPropertyResponseHandler handler( |
GetPropertyResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
| |
CIMName propertyName = request->propertyName; | CIMName propertyName = request->propertyName; |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.getProperty: " + | "Calling provider.getProperty: " + |
|
|
objectPath, | objectPath, |
propertyName, | propertyName, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
SetPropertyResponseHandler handler( |
SetPropertyResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
CIMName propertyName = request->propertyName; | CIMName propertyName = request->propertyName; |
CIMValue propertyValue = request->newValue; | CIMValue propertyValue = request->newValue; |
| |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.setProperty: " + | "Calling provider.setProperty: " + |
|
|
propertyName, | propertyName, |
propertyValue, | propertyValue, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
// create a handler for this request | // create a handler for this request |
InvokeMethodResponseHandler handler( |
InvokeMethodResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
instanceReference.setNameSpace(request->nameSpace); | instanceReference.setNameSpace(request->nameSpace); |
| |
// forward request | // forward request |
STAT_PMS_PROVIDERSTART; |
STAT_GETSTARTTIME; |
| |
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.invokeMethod: " + | "Calling provider.invokeMethod: " + |
|
|
request->methodName, | request->methodName, |
request->inParameters, | request->inParameters, |
handler); | handler); |
|
|
|
STAT_PMS_PROVIDEREND; |
|
} |
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown error."); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
OperationResponseHandler handler( |
OperationResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME)); |
|
context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionFilterQueryContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionFilterQueryContainer::NAME)); |
| |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
OperationResponseHandler handler( |
OperationResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME)); |
|
context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionFilterConditionContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionFilterQueryContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionFilterQueryContainer::NAME)); |
| |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
OperationResponseHandler handler( |
OperationResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); | context.insert(request->operationContext.get(AcceptLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); | context.insert(request->operationContext.get(ContentLanguageListContainer::NAME)); |
context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME)); | context.insert(request->operationContext.get(SubscriptionInstanceContainer::NAME)); |
|
context.insert(request->operationContext.get(SubscriptionLanguageListContainer::NAME)); |
| |
CIMObjectPath subscriptionName = request->subscriptionInstance.getPath(); | CIMObjectPath subscriptionName = request->subscriptionInstance.getPath(); |
| |
|
|
request->buildResponse()); | request->buildResponse()); |
PEGASUS_ASSERT(response != 0); | PEGASUS_ASSERT(response != 0); |
| |
OperationResponseHandler handler( |
OperationResponseHandler handler(request, response); |
request, response, _responseChunkCallback); |
|
| |
try | try |
{ | { |
|
|
OpProviderHolder ph = providerManager.getProvider( | OpProviderHolder ph = providerManager.getProvider( |
name.getPhysicalName(), name.getLogicalName()); | name.getPhysicalName(), name.getLogicalName()); |
| |
STAT_PMS_PROVIDERSTART |
STAT_GETSTARTTIME |
| |
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.: " + | "Calling provider.: " + |
|
|
ph.GetProvider().consumeIndication(context, | ph.GetProvider().consumeIndication(context, |
request->destinationPath, | request->destinationPath, |
indication_copy); | indication_copy); |
|
|
|
STAT_PMS_PROVIDEREND |
|
|
|
} |
|
|
|
catch(CIMException & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(e.getCode(), e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(Exception & e) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: " + e.getMessage()); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, e.getContentLanguages(), e.getMessage()); // l10n |
|
} |
|
catch(...) |
|
{ |
|
PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
|
"Exception: Unknown"); |
|
|
|
handler.setStatus(CIM_ERR_FAILED, "Unknown Error"); |
} | } |
HandleCatch(handler); |
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
| |
|
|
| |
void DefaultProviderManager::_callEnableIndications | void DefaultProviderManager::_callEnableIndications |
(CIMInstance & req_provider, | (CIMInstance & req_provider, |
PEGASUS_INDICATION_CALLBACK_T _indicationCallback, |
PEGASUS_INDICATION_CALLBACK _indicationCallback, |
OpProviderHolder & ph) | OpProviderHolder & ph) |
{ | { |
PEG_METHOD_ENTER (TRC_PROVIDERMANAGER, | PEG_METHOD_ENTER (TRC_PROVIDERMANAGER, |
|
|
CIMRequestMessage * request = 0; | CIMRequestMessage * request = 0; |
CIMResponseMessage * response = 0; | CIMResponseMessage * response = 0; |
EnableIndicationsResponseHandler * enableHandler = | EnableIndicationsResponseHandler * enableHandler = |
new EnableIndicationsResponseHandler( |
new EnableIndicationsResponseHandler |
request, |
(request, response, req_provider, _indicationCallback); |
response, |
|
req_provider, |
|
_indicationCallback, |
|
_responseChunkCallback); |
|
| |
PEG_TRACE_STRING (TRC_PROVIDERMANAGER, Tracer::LEVEL4, | PEG_TRACE_STRING (TRC_PROVIDERMANAGER, Tracer::LEVEL4, |
"Calling provider.enableIndications: " + | "Calling provider.enableIndications: " + |