version 1.72, 2005/10/24 19:35:27
|
version 1.78, 2006/04/18 19:08:44
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// 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 |
|
|
#ifdef PEGASUS_DISABLE_PROV_USERCTXT | #ifdef PEGASUS_DISABLE_PROV_USERCTXT |
if (forceProviderProcesses) | if (forceProviderProcesses) |
{ | { |
_oopProviderManagerRouter = |
_oopProviderManagerRouter = new OOPProviderManagerRouter( |
new OOPProviderManagerRouter(indicationCallback); |
indicationCallback, responseChunkCallback); |
} | } |
else | else |
{ | { |
_basicProviderManagerRouter = |
_basicProviderManagerRouter = new BasicProviderManagerRouter( |
new BasicProviderManagerRouter(indicationCallback); |
indicationCallback, responseChunkCallback); |
} | } |
#else | #else |
_oopProviderManagerRouter = |
_oopProviderManagerRouter = new OOPProviderManagerRouter( |
new OOPProviderManagerRouter(indicationCallback); |
indicationCallback, responseChunkCallback); |
| |
if (!forceProviderProcesses) | if (!forceProviderProcesses) |
{ | { |
_basicProviderManagerRouter = |
_basicProviderManagerRouter = new BasicProviderManagerRouter( |
new BasicProviderManagerRouter(indicationCallback); |
indicationCallback, responseChunkCallback); |
} | } |
#endif | #endif |
} | } |
|
|
| |
if (msg != 0) | if (msg != 0) |
{ | { |
AcceptLanguages* langs = new AcceptLanguages( |
AcceptLanguageList* langs = new AcceptLanguageList( |
((AcceptLanguageListContainer)msg->operationContext.get( | ((AcceptLanguageListContainer)msg->operationContext.get( |
AcceptLanguageListContainer::NAME)).getLanguages()); | AcceptLanguageListContainer::NAME)).getLanguages()); |
Thread::setLanguages(langs); | Thread::setLanguages(langs); |
|
|
.getValue(); | .getValue(); |
itValue.get(operationalStatus); | itValue.get(operationalStatus); |
| |
if (response != 0) |
|
{ |
|
delete response; | delete response; |
} |
|
| |
response = new CIMEnableModuleResponseMessage( | response = new CIMEnableModuleResponseMessage( |
request->messageId, | request->messageId, |
|
|
.getValue(); | .getValue(); |
itValue.get(operationalStatus); | itValue.get(operationalStatus); |
| |
if (response != 0) |
|
{ |
|
delete response; | delete response; |
} |
|
| |
response = new CIMDisableModuleResponseMessage( | response = new CIMDisableModuleResponseMessage( |
request->messageId, | request->messageId, |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |
void |
void ProviderManagerService::responseChunkCallback( |
ProviderManagerService::handleCimResponse(CIMRequestMessage &request, |
CIMRequestMessage* request, |
CIMResponseMessage &response) |
CIMResponseMessage* response) |
{ | { |
CIMStatusCode code = CIM_ERR_SUCCESS; |
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
String message; |
"ProviderManagerService::responseChunkCallback"); |
| |
try | try |
{ | { |
// only incomplete messages are processed because the caller ends up | // only incomplete messages are processed because the caller ends up |
// sending the complete() stage | // sending the complete() stage |
PEGASUS_ASSERT(response.isComplete() == false); |
PEGASUS_ASSERT(response->isComplete() == false); |
| |
AsyncLegacyOperationStart *requestAsync = | AsyncLegacyOperationStart *requestAsync = |
dynamic_cast<AsyncLegacyOperationStart *>(request._async); |
dynamic_cast<AsyncLegacyOperationStart *>(request->_async); |
PEGASUS_ASSERT(requestAsync); | PEGASUS_ASSERT(requestAsync); |
AsyncOpNode *op = requestAsync->op; | AsyncOpNode *op = requestAsync->op; |
PEGASUS_ASSERT(op); | PEGASUS_ASSERT(op); |
PEGASUS_ASSERT(! response._async); |
PEGASUS_ASSERT(!response->_async); |
response._async = new AsyncLegacyOperationResult |
response->_async = new AsyncLegacyOperationResult( |
(requestAsync->getKey(), requestAsync->getRouting(), op, &response); |
requestAsync->getKey(), requestAsync->getRouting(), op, response); |
| |
// set the destination | // set the destination |
op->_op_dest = op->_callback_response_q; | op->_op_dest = op->_callback_response_q; |
|
|
| |
op->_async_callback(op, service, op->_callback_ptr); | op->_async_callback(op, service, op->_callback_ptr); |
} | } |
|
|
catch(CIMException &e) |
|
{ |
|
code = e.getCode(); |
|
message = e.getMessage(); |
|
} |
|
catch(Exception &e) | catch(Exception &e) |
{ | { |
code = CIM_ERR_FAILED; |
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, |
message = e.getMessage(); |
"Exception in ProviderManagerService::responseChunkCallback: " + |
|
e.getMessage() + ". Chunk not delivered."); |
} | } |
catch(...) | catch(...) |
{ | { |
code = CIM_ERR_FAILED; |
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, |
message = cimStatusCodeToString(code); |
"Exception in ProviderManagerService::responseChunkCallback. " |
|
"Chunk not delivered."); |
} | } |
| |
if (code != CIM_ERR_SUCCESS) |
PEG_METHOD_EXIT(); |
response.cimException = PEGASUS_CIM_EXCEPTION(code, message); |
|
} | } |
| |
Message* ProviderManagerService::_processMessage(CIMRequestMessage* request) | Message* ProviderManagerService::_processMessage(CIMRequestMessage* request) |
|
|
{ | { |
// Note: These responses do not contain interesting data, so just | // Note: These responses do not contain interesting data, so just |
// use the last one. | // use the last one. |
if (response) |
|
{ |
|
delete response; | delete response; |
} |
|
| |
response = _oopProviderManagerRouter->processMessage(request); | response = _oopProviderManagerRouter->processMessage(request); |
} | } |
|
|
AcceptLanguageListContainer cntr = request->operationContext.get(AcceptLanguageListContainer::NAME); | AcceptLanguageListContainer cntr = request->operationContext.get(AcceptLanguageListContainer::NAME); |
}catch(const Exception &) | }catch(const Exception &) |
{ | { |
request->operationContext.insert(AcceptLanguageListContainer(AcceptLanguages::EMPTY)); |
request->operationContext.insert(AcceptLanguageListContainer(AcceptLanguageList())); |
} | } |
| |
if (_indicationServiceQueueId == PEG_NOT_FOUND) | if (_indicationServiceQueueId == PEG_NOT_FOUND) |