version 1.25, 2006/09/01 17:51:28
|
version 1.26, 2006/11/14 18:34:54
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Chip Vincent (cvincent@us.ibm.com) |
|
// |
|
// Modified By: |
|
// Carol Ann Krug Graves, Hewlett-Packard Company (carolann_graves@hp.com) |
|
// Mike Day, IBM (mdday@us.ibm.com) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// Seema Gupta, (gseema@in.ibm.com for PEP135) |
|
// Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090 |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
| |
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
InternalCIMOMHandleMessageQueue::InternalCIMOMHandleMessageQueue(void) |
InternalCIMOMHandleMessageQueue::InternalCIMOMHandleMessageQueue() |
: MessageQueue(PEGASUS_QUEUENAME_INTERNALCLIENT), | : MessageQueue(PEGASUS_QUEUENAME_INTERNALCLIENT), |
_output_qid(0), | _output_qid(0), |
_return_qid(0), | _return_qid(0), |
|
|
_return_qid = getQueueId(); | _return_qid = getQueueId(); |
} | } |
| |
InternalCIMOMHandleMessageQueue::~InternalCIMOMHandleMessageQueue(void) |
InternalCIMOMHandleMessageQueue::~InternalCIMOMHandleMessageQueue() |
{ | { |
try | try |
{ | { |
|
|
} | } |
} | } |
| |
void InternalCIMOMHandleMessageQueue::handleEnqueue(void) |
void InternalCIMOMHandleMessageQueue::handleEnqueue() |
{ | { |
PEG_METHOD_ENTER(TRC_CIMOM_HANDLE, "InternalCIMOMHandleMessageQueue::handleEnqueue"); |
PEG_METHOD_ENTER(TRC_CIMOM_HANDLE, |
|
"InternalCIMOMHandleMessageQueue::handleEnqueue"); |
| |
Message* message = dequeue(); | Message* message = dequeue(); |
| |
|
|
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |
CIMResponseMessage* InternalCIMOMHandleMessageQueue::sendRequest(CIMRequestMessage* request) |
CIMResponseMessage* InternalCIMOMHandleMessageQueue::sendRequest( |
|
CIMRequestMessage* request) |
{ | { |
PEG_METHOD_ENTER(TRC_CIMOM_HANDLE, "InternalCIMOMHandleRep::sendRequest"); | PEG_METHOD_ENTER(TRC_CIMOM_HANDLE, "InternalCIMOMHandleRep::sendRequest"); |
| |
|
|
dynamic_cast<CIMResponseMessage *>(_response.dequeue_wait()); | dynamic_cast<CIMResponseMessage *>(_response.dequeue_wait()); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(response); |
return response; |
} | } |
| |
static void _deleteContentLanguage(void* data) | static void _deleteContentLanguage(void* data) |
|
|
| |
if(ycmGetCurrentUser(os400UserName) == 0) | if(ycmGetCurrentUser(os400UserName) == 0) |
{ | { |
throw CIMException( |
throw CIMException(CIM_ERR_FAILED, MessageLoaderParms( |
CIM_ERR_FAILED, |
|
MessageLoaderParms( |
|
"Common.CIMOMHandleOS400UserState.UNKNOWN_ERROR", | "Common.CIMOMHandleOS400UserState.UNKNOWN_ERROR", |
"An internal error occurred during the processing of the CIMOM handle")); |
"An internal error occurred during the processing of the " |
|
"CIMOM handle")); |
} | } |
| |
EtoA(os400UserName); | EtoA(os400UserName); |
|
|
| |
if(context.contains(AcceptLanguageListContainer::NAME)) | if(context.contains(AcceptLanguageListContainer::NAME)) |
{ | { |
// propagate the accept languages container if it exists (get() with throw |
// propagate the accept languages container if it exists |
// an exception if it does not exist) |
// (get() with throw an exception if it does not exist) |
temp.insert(context.get(AcceptLanguageListContainer::NAME)); | temp.insert(context.get(AcceptLanguageListContainer::NAME)); |
} | } |
else | else |
|
|
| |
if(context.contains(ContentLanguageListContainer::NAME)) | if(context.contains(ContentLanguageListContainer::NAME)) |
{ | { |
// propagate the accept languages container if it exists (get() with throw |
// propagate the accept languages container if it exists |
// an exception if it does not) |
// (get() with throw an exception if it does not) |
temp.insert(context.get(ContentLanguageListContainer::NAME)); | temp.insert(context.get(ContentLanguageListContainer::NAME)); |
} | } |
else | else |
|
|
} | } |
#endif | #endif |
| |
CIMResponseMessage* InternalCIMOMHandleRep::do_request(CIMRequestMessage* request) |
CIMResponseMessage* InternalCIMOMHandleRep::do_request( |
|
CIMRequestMessage* request) |
{ | { |
PEG_METHOD_ENTER(TRC_CIMOM_HANDLE, "InternalCIMOMHandleRep::do_request"); | PEG_METHOD_ENTER(TRC_CIMOM_HANDLE, "InternalCIMOMHandleRep::do_request"); |
| |
#ifdef PEGASUS_OS_OS400 | #ifdef PEGASUS_OS_OS400 |
// On OS/400, this code runs in a system state thread. Swap the | // On OS/400, this code runs in a system state thread. Swap the |
// thread profile to be able to access server resources. | // thread profile to be able to access server resources. |
if(CIMOMHandleOS400SystemState::setProfileHandle(os400PH) != CIM_ERR_SUCCESS) |
if (CIMOMHandleOS400SystemState::setProfileHandle(os400PH) != |
|
CIM_ERR_SUCCESS) |
{ | { |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw Exception("Could not set profile handle"); | throw Exception("Could not set profile handle"); |
|
|
delete response; | delete response; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION_L( |
throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms( |
CIM_ERR_FAILED, |
|
MessageLoaderParms( |
|
"Provider.CIMOMHandle.EMPTY_CIM_RESPONSE", | "Provider.CIMOMHandle.EMPTY_CIM_RESPONSE", |
"Empty CIM Response")); | "Empty CIM Response")); |
} | } |
|
|
| |
if(response->operationContext.contains(ContentLanguageListContainer::NAME)) | if(response->operationContext.contains(ContentLanguageListContainer::NAME)) |
{ | { |
// If the response has a Content-Language then save it into thread-specific storage |
// If the response has a Content-Language then save it into |
|
// thread-specific storage |
ContentLanguageListContainer container = | ContentLanguageListContainer container = |
response->operationContext.get(ContentLanguageListContainer::NAME); | response->operationContext.get(ContentLanguageListContainer::NAME); |
| |
|
|
propertyList); | propertyList); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimClass); |
return cimClass; |
} | } |
#endif | #endif |
| |
|
|
"Exception caught in CIMOMHandle"); | "Exception caught in CIMOMHandle"); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw CIMException( |
throw CIMException(CIM_ERR_FAILED, MessageLoaderParms( |
CIM_ERR_FAILED, |
|
MessageLoaderParms( |
|
"Provider.CIMOMHandle.CAUGHT_EXCEPTION", | "Provider.CIMOMHandle.CAUGHT_EXCEPTION", |
"Exception caught in CIMOMHandle")); | "Exception caught in CIMOMHandle")); |
} | } |
|
|
CIMClass cimClass = response->cimClass; | CIMClass cimClass = response->cimClass; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimClass); |
return cimClass; |
} | } |
| |
| |
|
|
includeClassOrigin); | includeClassOrigin); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimClasses); |
return cimClasses; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMClass> cimClasses = response->cimClasses; | Array<CIMClass> cimClasses = response->cimClasses; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimClasses); |
return cimClasses; |
} | } |
| |
| |
|
|
deepInheritance); | deepInheritance); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimClassNames); |
return cimClassNames; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMName> cimClassNames = response->classNames; | Array<CIMName> cimClassNames = response->classNames; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimClassNames); |
return cimClassNames; |
} | } |
| |
| |
|
|
propertyList); | propertyList); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimInstance); |
return cimInstance; |
} | } |
#endif | #endif |
| |
|
|
CIMInstance cimInstance = response->cimInstance; | CIMInstance cimInstance = response->cimInstance; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimInstance); |
return cimInstance; |
} | } |
| |
Array<CIMInstance> InternalCIMOMHandleRep::enumerateInstances( | Array<CIMInstance> InternalCIMOMHandleRep::enumerateInstances( |
|
|
propertyList); | propertyList); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimInstances); |
return cimInstances; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMInstance> cimInstances = response->cimNamedInstances; | Array<CIMInstance> cimInstances = response->cimNamedInstances; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimInstances); |
return cimInstances; |
} | } |
| |
| |
|
|
className); | className); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjectPaths); |
return cimObjectPaths; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMObjectPath> cimObjectPaths = response->instanceNames; | Array<CIMObjectPath> cimObjectPaths = response->instanceNames; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjectPaths); |
return cimObjectPaths; |
} | } |
| |
CIMObjectPath InternalCIMOMHandleRep::createInstance( | CIMObjectPath InternalCIMOMHandleRep::createInstance( |
|
|
newInstance); | newInstance); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimReference); |
return cimReference; |
} | } |
#endif | #endif |
| |
|
|
CIMObjectPath cimReference = response->instanceName; | CIMObjectPath cimReference = response->instanceName; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimReference); |
return cimReference; |
} | } |
| |
| |
|
|
query); | query); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjects); |
return cimObjects; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMObject> cimObjects = response->cimObjects; | Array<CIMObject> cimObjects = response->cimObjects; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjects); |
return cimObjects; |
} | } |
| |
| |
|
|
propertyList); | propertyList); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjects); |
return cimObjects; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMObject> cimObjects = response->cimObjects; | Array<CIMObject> cimObjects = response->cimObjects; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjects); |
return cimObjects; |
} | } |
| |
| |
|
|
resultRole); | resultRole); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjectPaths); |
return cimObjectPaths; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMObjectPath> cimObjectPaths = response->objectNames; | Array<CIMObjectPath> cimObjectPaths = response->objectNames; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjectPaths); |
return cimObjectPaths; |
} | } |
| |
| |
|
|
propertyList); | propertyList); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjects); |
return cimObjects; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMObject> cimObjects = response->cimObjects; | Array<CIMObject> cimObjects = response->cimObjects; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjects); |
return cimObjects; |
} | } |
| |
| |
|
|
role); | role); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjectPaths); |
return cimObjectPaths; |
} | } |
#endif | #endif |
| |
|
|
Array<CIMObjectPath> cimObjectPaths = response->objectNames; | Array<CIMObjectPath> cimObjectPaths = response->objectNames; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimObjectPaths); |
return cimObjectPaths; |
} | } |
| |
| |
|
|
propertyName); | propertyName); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimValue); |
return cimValue; |
} | } |
#endif | #endif |
| |
|
|
CIMValue cimValue = response->value; | CIMValue cimValue = response->value; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimValue); |
return cimValue; |
} | } |
| |
| |
|
|
outParameters); | outParameters); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimValue); |
return cimValue; |
} | } |
#endif | #endif |
| |
|
|
outParameters = response->outParameters; | outParameters = response->outParameters; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
return(cimValue); |
return cimValue; |
} | } |
| |
| |