version 1.39, 2002/04/27 00:02:35
|
version 1.40, 2002/05/01 21:25:12
|
|
|
} | } |
else if ( req->getType() == async_messages::ASYNC_LEGACY_OP_START ) | else if ( req->getType() == async_messages::ASYNC_LEGACY_OP_START ) |
{ | { |
|
try |
|
{ |
|
|
req->op->processing(); | req->op->processing(); |
Message *legacy = | Message *legacy = |
(static_cast<AsyncLegacyOperationStart *>(req)->get_action()); | (static_cast<AsyncLegacyOperationStart *>(req)->get_action()); |
|
legacy->put_async(req); |
|
|
handleEnqueue(legacy); | handleEnqueue(legacy); |
|
} |
|
catch(Exception & ) |
|
{ |
|
PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL3, |
|
"Caught Exception in IndicationService while handling a wrapped legacy message "); |
|
_make_response(req, async_results::CIM_NAK ); |
|
} |
|
|
return; | return; |
} | } |
else | else |
|
|
void IndicationService::handleEnqueue(Message* message) | void IndicationService::handleEnqueue(Message* message) |
{ | { |
| |
|
|
|
|
switch(message->getType()) | switch(message->getType()) |
{ | { |
case CIM_GET_INSTANCE_REQUEST_MESSAGE: | case CIM_GET_INSTANCE_REQUEST_MESSAGE: |
|
try |
|
{ |
_handleGetInstanceRequest(message); | _handleGetInstanceRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
|
|
break; | break; |
| |
case CIM_ENUMERATE_INSTANCES_REQUEST_MESSAGE: | case CIM_ENUMERATE_INSTANCES_REQUEST_MESSAGE: |
|
try |
|
{ |
_handleEnumerateInstancesRequest(message); | _handleEnumerateInstancesRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
|
|
break; | break; |
| |
case CIM_ENUMERATE_INSTANCE_NAMES_REQUEST_MESSAGE: | case CIM_ENUMERATE_INSTANCE_NAMES_REQUEST_MESSAGE: |
|
try |
|
{ |
|
|
_handleEnumerateInstanceNamesRequest(message); | _handleEnumerateInstanceNamesRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
|
|
break; | break; |
| |
case CIM_CREATE_INSTANCE_REQUEST_MESSAGE: | case CIM_CREATE_INSTANCE_REQUEST_MESSAGE: |
|
try |
|
{ |
|
|
_handleCreateInstanceRequest(message); | _handleCreateInstanceRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
break; | break; |
| |
case CIM_MODIFY_INSTANCE_REQUEST_MESSAGE: | case CIM_MODIFY_INSTANCE_REQUEST_MESSAGE: |
|
try |
|
{ |
|
|
_handleModifyInstanceRequest(message); | _handleModifyInstanceRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
break; | break; |
| |
case CIM_DELETE_INSTANCE_REQUEST_MESSAGE: | case CIM_DELETE_INSTANCE_REQUEST_MESSAGE: |
|
try |
|
{ |
_handleDeleteInstanceRequest(message); | _handleDeleteInstanceRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
break; | break; |
| |
case CIM_PROCESS_INDICATION_REQUEST_MESSAGE: | case CIM_PROCESS_INDICATION_REQUEST_MESSAGE: |
|
try |
|
{ |
_handleProcessIndicationRequest(message); | _handleProcessIndicationRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
break; | break; |
| |
case CIM_NOTIFY_PROVIDER_REGISTRATION_REQUEST_MESSAGE: | case CIM_NOTIFY_PROVIDER_REGISTRATION_REQUEST_MESSAGE: |
|
try |
|
{ |
_handleNotifyProviderRegistrationRequest(message); | _handleNotifyProviderRegistrationRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
break; | break; |
| |
case CIM_NOTIFY_PROVIDER_TERMINATION_REQUEST_MESSAGE: | case CIM_NOTIFY_PROVIDER_TERMINATION_REQUEST_MESSAGE: |
|
try |
|
{ |
_handleNotifyProviderTerminationRequest(message); | _handleNotifyProviderTerminationRequest(message); |
|
} |
|
catch( ... ) |
|
{ |
|
|
|
; |
|
} |
break; | break; |
| |
default: | default: |
|
|
// A message type not supported by the Indication Service | // A message type not supported by the Indication Service |
// Should not reach here | // Should not reach here |
// | // |
PEGASUS_ASSERT (true); |
// << Mon Apr 29 16:29:10 2002 mdd >> |
|
PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL3, |
|
"IndicationService::handleEnqueue(msg *) rcv'd unsupported msg " |
|
+ String(MessageTypeToString(message->getType()))); |
break; | break; |
} | } |
| |
|
|
| |
CIMInstance handler; | CIMInstance handler; |
CIMInstance indication = request->indicationInstance; | CIMInstance indication = request->indicationInstance; |
//cout << "Received indication: " << indication.getClassName () << endl; |
PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"Received Indication " + |
|
indication.getClassName() ); |
try | try |
{ | { |
WQLSimplePropertySource propertySource = _getPropertySourceFromInstance( | WQLSimplePropertySource propertySource = _getPropertySourceFromInstance( |
|
|
// On Fatal Error Policy if message to handler was not | // On Fatal Error Policy if message to handler was not |
// successful | // successful |
// | // |
|
PEG_TRACE_STRING(TRC_INDICATION_SERVICE, Tracer::LEVEL4, |
|
"Sending (SendForget) Indication to " + |
|
((MessageQueue::lookup(_handlerService)) ? |
|
String( ((MessageQueue::lookup(_handlerService))->getQueueName()) ) : |
|
String("BAD queue name")) + |
|
"via CIMHandleIndicationRequestMessage" ); |
|
|
SendForget(async_req); | SendForget(async_req); |
| |
// | // |
|
|
IndicationService *service = | IndicationService *service = |
static_cast<IndicationService *>(q); | static_cast<IndicationService *>(q); |
| |
|
cout << " send enable callback " << endl; |
|
|
AsyncRequest *asyncRequest = static_cast<AsyncRequest *>(op->get_request()); | AsyncRequest *asyncRequest = static_cast<AsyncRequest *>(op->get_request()); |
AsyncReply *asyncReply = static_cast<AsyncReply *>(op->get_response()); | AsyncReply *asyncReply = static_cast<AsyncReply *>(op->get_response()); |
CIMEnableIndicationsRequestMessage *request = | CIMEnableIndicationsRequestMessage *request = |
|
|
//((static_cast<AsyncLegacyOperationResult *>(asyncReply))->get_result()); | //((static_cast<AsyncLegacyOperationResult *>(asyncReply))->get_result()); |
| |
CIMEnableIndicationsResponseMessage * response = | CIMEnableIndicationsResponseMessage * response = |
reinterpret_cast |
reinterpret_cast<CIMEnableIndicationsResponseMessage *> |
<CIMEnableIndicationsResponseMessage *> |
|
((static_cast <AsyncLegacyOperationResult *> | ((static_cast <AsyncLegacyOperationResult *> |
(asyncReply))->get_result()); | (asyncReply))->get_result()); |
| |