version 1.263, 2006/11/17 19:02:09
|
version 1.263.4.3, 2008/02/22 21:49:57
|
|
|
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
// | // |
//============================================================================== |
//============================================================================= |
// | // |
//%///////////////////////////////////////////////////////////////////////////// |
//%//////////////////////////////////////////////////////////////////////////// |
| |
#include "CIMOperationRequestDispatcher.h" | #include "CIMOperationRequestDispatcher.h" |
| |
|
|
_totalReceivedExpected, | _totalReceivedExpected, |
_totalReceived, | _totalReceived, |
_totalReceivedErrors)); | _totalReceivedErrors)); |
Tracer::trace( |
PEG_TRACE(( |
__FILE__, __LINE__, TRC_DISCARDED_DATA, Tracer::LEVEL2, | __FILE__, __LINE__, TRC_DISCARDED_DATA, Tracer::LEVEL2, |
"All completed responses (%u) for current request " | "All completed responses (%u) for current request " |
"have been accounted for but expected count (%u) does " | "have been accounted for but expected count (%u) does " |
|
|
_totalReceivedComplete, | _totalReceivedComplete, |
_totalReceivedExpected, | _totalReceivedExpected, |
_totalReceived, | _totalReceived, |
_totalReceivedErrors); |
_totalReceivedErrors)); |
} | } |
| |
// If all of the errors received were NOT_SUPPORTED and | // If all of the errors received were NOT_SUPPORTED and |
|
|
PEGASUS_QUEUENAME_CONTROLSERVICE); | PEGASUS_QUEUENAME_CONTROLSERVICE); |
| |
_routing_table.insert_record( | _routing_table.insert_record( |
|
PEGASUS_CLASSNAME_PG_ELEMENTCONFORMSTOPROFILE_RP_RP, |
|
_wild, |
|
DynamicRoutingTable::INTERNAL, |
|
0, |
|
static_cast<MessageQueueService*>( |
|
MessageQueue::lookup(PEGASUS_QUEUENAME_CONTROLSERVICE)), |
|
PEGASUS_MODULENAME_INTEROPPROVIDER, |
|
PEGASUS_QUEUENAME_CONTROLSERVICE); |
|
|
|
_routing_table.insert_record( |
PEGASUS_CLASSNAME_PG_SUBPROFILEREQUIRESPROFILE, | PEGASUS_CLASSNAME_PG_SUBPROFILEREQUIRESPROFILE, |
PEGASUS_NAMESPACENAME_INTEROP, | PEGASUS_NAMESPACENAME_INTEROP, |
DynamicRoutingTable::INTERNAL, | DynamicRoutingTable::INTERNAL, |
|
|
#ifdef PEGASUS_ENABLE_REMOTE_CMPI | #ifdef PEGASUS_ENABLE_REMOTE_CMPI |
String remoteInformation; | String remoteInformation; |
Boolean isRemote = false; | Boolean isRemote = false; |
isRemote = _repository->isRemoteNameSpace(nameSpace, remoteInformation); |
isRemote = _repository->isRemoteNameSpace( |
|
nameSpace, |
|
remoteInformation); |
if (isRemote) | if (isRemote) |
providercontainer = new ProviderIdContainer( | providercontainer = new ProviderIdContainer( |
pmInstance, pInstance, isRemote, remoteInformation); | pmInstance, pInstance, isRemote, remoteInformation); |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
if (tmp.size() > 0) | if (tmp.size() > 0) |
|
|
| |
if (providerNames.size() == 0) | if (providerNames.size() == 0) |
{ | { |
PEG_TRACE_STRING(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE_STRING( |
"Association Provider NOT found for Class " + assocClass.getString() |
TRC_DISPATCHER, |
+ " in nameSpace " + nameSpace.getString()); |
Tracer::LEVEL4, |
|
"Association Provider NOT found for Class " + |
|
assocClass.getString() + |
|
" in nameSpace " + |
|
nameSpace.getString()); |
} | } |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return providerNames; | return providerNames; |
|
|
if (response->isComplete()) | if (response->isComplete()) |
{ | { |
// these are per provider instantiations | // these are per provider instantiations |
|
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
|
"Provider response is complete."); |
op->removeRequest(); | op->removeRequest(); |
delete asyncRequest; | delete asyncRequest; |
op->release(); | op->release(); |
service->return_op(op); | service->return_op(op); |
} | } |
|
else |
|
{ |
|
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
|
"Provider response is incomplete."); |
|
} |
| |
// After resequencing, this flag represents the completion status of | // After resequencing, this flag represents the completion status of |
// the ENTIRE response to the request. | // the ENTIRE response to the request. |
|
|
if (isComplete) | if (isComplete) |
{ | { |
// also deletes the copied request attached to it | // also deletes the copied request attached to it |
|
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
|
"Entire response to a request is complete."); |
delete poA; | delete poA; |
poA = 0; | poA = 0; |
} | } |
|
else |
|
{ |
|
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
|
"The response to a request is not complete."); |
|
} |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
|
|
response->dest = request->queueIds.top(); | response->dest = request->queueIds.top(); |
// Use the same key,setHTTPMethod and closeConnect as used in the request: | // Use the same key,setHTTPMethod and closeConnect as used in the request: |
response->syncAttributes(request); | response->syncAttributes(request); |
Tracer::trace( |
PEG_TRACE(( |
TRC_HTTP, | TRC_HTTP, |
Tracer::LEVEL3, | Tracer::LEVEL3, |
"_CIMOperationRequestDispatcher::_enqueueResponse - " | "_CIMOperationRequestDispatcher::_enqueueResponse - " |
"request->getCloseConnect() returned %d", | "request->getCloseConnect() returned %d", |
request->getCloseConnect()); |
request->getCloseConnect())); |
| |
_logOperation(request, response); | _logOperation(request, response); |
| |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->cimInstance = cimInstance; | response->cimInstance = cimInstance; |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->cimException = cimException; | response->cimException = cimException; |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->cimException = cimException; | response->cimException = cimException; |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->cimException = cimException; | response->cimException = cimException; |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->instanceName = instanceName; | response->instanceName = instanceName; |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->cimException = cimException; | response->cimException = cimException; |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->cimClasses = cimClasses; | response->cimClasses = cimClasses; |
|
|
| |
PEG_LOGGER_TRACE(( | PEG_LOGGER_TRACE(( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, | Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
"CIMOperationRequestDispatcher::handleEnumerateClassNamesRequest - " |
"CIMOperationRequestDispatcher::handleEnumerateClassNamesRequest" |
"Namespace: $0 Class name: $1", |
" - Namespace: $0 Class name: $1", |
request->nameSpace.getString(), | request->nameSpace.getString(), |
request->className.getString())); | request->className.getString())); |
} | } |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
response->classNames = classNames; | response->classNames = classNames; |
|
|
// For Class requests, get the results from the repository | // For Class requests, get the results from the repository |
// | // |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
"Associators executing Class request"); | "Associators executing Class request"); |
| |
AutoPtr<CIMAssociatorsResponseMessage> response( | AutoPtr<CIMAssociatorsResponseMessage> response( |
|
|
return; | return; |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"providerCount = %u.", providerCount); |
"providerCount = %u.", providerCount)); |
| |
// If no provider is registered and the repository isn't the default, | // If no provider is registered and the repository isn't the default, |
// return CIM_ERR_NOT_SUPPORTED | // return CIM_ERR_NOT_SUPPORTED |
|
|
CIM_ERR_FAILED, String::EMPTY); | CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"Associators repository access: class = %s, count = %u.", | "Associators repository access: class = %s, count = %u.", |
(const char*)request->objectName.toString().getCString(), | (const char*)request->objectName.toString().getCString(), |
response->cimObjects.size()); |
response->cimObjects.size())); |
} | } |
| |
// | // |
|
|
// For Class requests, get the results from the repository | // For Class requests, get the results from the repository |
// | // |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
"AssociatorNames executing Class request"); | "AssociatorNames executing Class request"); |
| |
AutoPtr<CIMAssociatorNamesResponseMessage> response( | AutoPtr<CIMAssociatorNamesResponseMessage> response( |
|
|
return; | return; |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"providerCount = %u.", providerCount); |
"providerCount = %u.", providerCount)); |
| |
// If no provider is registered and the repository isn't the default, | // If no provider is registered and the repository isn't the default, |
// return CIM_ERR_NOT_SUPPORTED | // return CIM_ERR_NOT_SUPPORTED |
|
|
CIM_ERR_FAILED, String::EMPTY); | CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"AssociatorNames repository access: class = %s, count = %u.", | "AssociatorNames repository access: class = %s, count = %u.", |
(const char*)request->objectName.toString().getCString(), | (const char*)request->objectName.toString().getCString(), |
response->objectNames.size()); |
response->objectNames.size())); |
} | } |
| |
// | // |
|
|
// For Class requests, get the results from the repository | // For Class requests, get the results from the repository |
// | // |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
"References executing Class request"); | "References executing Class request"); |
| |
AutoPtr<CIMReferencesResponseMessage> response( | AutoPtr<CIMReferencesResponseMessage> response( |
|
|
return; | return; |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"providerCount = %u.", providerCount); |
"providerCount = %u.", providerCount)); |
| |
// If no provider is registered and the repository isn't the default, | // If no provider is registered and the repository isn't the default, |
// return CIM_ERR_NOT_SUPPORTED | // return CIM_ERR_NOT_SUPPORTED |
|
|
CIM_ERR_FAILED, String::EMPTY); | CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"References repository access: class = %s, count = %u.", | "References repository access: class = %s, count = %u.", |
(const char*)request->objectName.toString().getCString(), | (const char*)request->objectName.toString().getCString(), |
response->cimObjects.size()); |
response->cimObjects.size())); |
} | } |
| |
// | // |
|
|
// For Class requests, get the results from the repository | // For Class requests, get the results from the repository |
// | // |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE_CSTRING(TRC_DISPATCHER, Tracer::LEVEL4, |
"ReferenceNames executing Class request"); | "ReferenceNames executing Class request"); |
| |
AutoPtr<CIMReferenceNamesResponseMessage> response( | AutoPtr<CIMReferenceNamesResponseMessage> response( |
|
|
return; | return; |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"providerCount = %u.", providerCount); |
"providerCount = %u.", providerCount)); |
| |
// If no provider is registered and the repository isn't the default, | // If no provider is registered and the repository isn't the default, |
// return CIM_ERR_NOT_SUPPORTED | // return CIM_ERR_NOT_SUPPORTED |
|
|
CIM_ERR_FAILED, String::EMPTY); | CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
Tracer::trace(TRC_DISPATCHER, Tracer::LEVEL4, |
PEG_TRACE((TRC_DISPATCHER, Tracer::LEVEL4, |
"ReferenceNames repository access: class = %s, count = %u.", | "ReferenceNames repository access: class = %s, count = %u.", |
(const char*)request->objectName.toString().getCString(), | (const char*)request->objectName.toString().getCString(), |
response->objectNames.size()); |
response->objectNames.size())); |
} | } |
| |
// | // |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
if (cimException.getCode() != CIM_ERR_SUCCESS) | if (cimException.getCode() != CIM_ERR_SUCCESS) |
|
|
| |
PEG_LOGGER_TRACE(( | PEG_LOGGER_TRACE(( |
Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, | Logger::STANDARD_LOG, System::CIMSERVER, Logger::TRACE, |
"CIMOperationRequestDispatcher::handleEnumerateQualifiersRequest - " |
"CIMOperationRequestDispatcher::handleEnumerateQualifiersRequest" |
"Namespace: $0", |
" - Namespace: $0", |
request->nameSpace.getString())); | request->nameSpace.getString())); |
} | } |
catch (const CIMException& exception) | catch (const CIMException& exception) |
|
|
} | } |
catch (...) | catch (...) |
{ | { |
cimException = PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
cimException = |
|
PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, String::EMPTY); |
} | } |
| |
if (cimException.getCode() != CIM_ERR_SUCCESS) | if (cimException.getCode() != CIM_ERR_SUCCESS) |
|
|
2. prune the properties if localOnly or deepInheritance are set. | 2. prune the properties if localOnly or deepInheritance are set. |
This function does not send any responses. | This function does not send any responses. |
*/ | */ |
void CIMOperationRequestDispatcher::handleEnumerateInstancesResponseAggregation( |
void CIMOperationRequestDispatcher:: |
|
handleEnumerateInstancesResponseAggregation( |
OperationAggregate* poA) | OperationAggregate* poA) |
{ | { |
PEG_METHOD_ENTER(TRC_DISPATCHER, | PEG_METHOD_ENTER(TRC_DISPATCHER, |
|
|
catch (Exception& e) | catch (Exception& e) |
{ | { |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, e.getMessage()); |
throw PEGASUS_CIM_EXCEPTION( |
|
CIM_ERR_FAILED, |
|
e.getMessage()); |
} | } |
catch (...) | catch (...) |
{ | { |
|
|
| |
if (inParameters[i].getValue().isNull()) | if (inParameters[i].getValue().isNull()) |
{ | { |
newValue.setNullValue(param.getType(), param.isArray()); |
newValue.setNullValue( |
|
param.getType(), |
|
param.isArray()); |
} | } |
else if (inParameters[i].getValue().isArray() != | else if (inParameters[i].getValue().isArray() != |
param.isArray()) | param.isArray()) |
|
|
} | } |
else | else |
{ | { |
newValue = _convertValueType(inParameters[i].getValue(), |
newValue = _convertValueType( |
|
inParameters[i].getValue(), |
paramType); | paramType); |
} | } |
| |