Added more REVIEW notes.
authormike <mike>
Fri, 28 Dec 2001 23:09:48 +0000 (23:09 +0000)
committermike <mike>
Fri, 28 Dec 2001 23:09:48 +0000 (23:09 +0000)
src/Pegasus/ExportServer/CIMExportRequestDispatcher.cpp
src/Pegasus/ExportServer/CIMExportRequestDispatcher.h
src/Pegasus/_cimom/Cimom.h

index 74b99dd1410739ef06b43e21cc116dcf6c5d63d6..d8f9128251b9df6dc0c593815edabefec0580110 100644 (file)
@@ -101,15 +101,23 @@ void CIMExportRequestDispatcher::_handleExportIndicationRequest(
     CIMStatusCode errorCode = CIM_ERR_SUCCESS;
     String errorDescription;
 
+    // REVIEW: CIMIndicationConsumer implementation is tied to provider
+    // interface which makes it unsuable by stand-alone listeners
+    // which aren't CIMOMs and don't have provider interfaces.
+
     CIMIndicationConsumer* consumer = _lookupConsumer(request->url);
     
     if (consumer)
+    {
        consumer->handleIndication(
-       context,
-       request->url, 
-       request->indicationInstance);
+           context,
+           request->url, 
+           request->indicationInstance);
+    }
     else
+    {
        throw CIMException(CIM_ERR_FAILED);
+    }
 
     CIMExportIndicationResponseMessage* response = 
        new CIMExportIndicationResponseMessage(
@@ -121,6 +129,10 @@ void CIMExportRequestDispatcher::_handleExportIndicationRequest(
     _enqueueResponse(request, response);
 }
 
+// REVIEW: this implementation ties the CIMExportRequestDispatcher
+// to the CIMOM so that it cannot be used in a standalone listener.
+// This belongs in the indication processor.
+
 void CIMExportRequestDispatcher::handleIndication(
     CIMInstance& indicationHandlerInstance,
     CIMInstance& indicationInstance,
@@ -182,7 +194,11 @@ CIMHandler* CIMExportRequestDispatcher::_lookupHandlerForClass(
     return handler;
 }
 
-CIMIndicationConsumer* CIMExportRequestDispatcher::_lookupConsumer(const String& url)
+// REVIEW: Why must consumer be dynamically loaded? It makes sense in
+// the case in which they are provider (then let the provider manager do it).
+
+CIMIndicationConsumer* CIMExportRequestDispatcher::_lookupConsumer(
+    const String& url)
 {
     //ATTN: How to get NAMESPACE? Defining just to proceed further.
     String NAMESPACE = "root/cimv2";
index d931ede8fc335e1d0fbe6a8d44dc904dcdeb89b6..603d51e6bb534083bab1003c22996cff1e17cb9e 100644 (file)
@@ -65,6 +65,7 @@ public:
        String nameSpace);
 
 protected:
+
     CIMHandler* _lookupHandlerForClass(
        const String& nameSpace,
        const String& className);
index c6e7e4383193e0ff29d2ed0108a8e3e312f7fa59..3bd312c3b81a52791c9fe106dee8581aa9862a5a 100644 (file)
@@ -222,11 +222,6 @@ inline Uint32 cimom::getModuleIDs(Uint32 *ids, Uint32 count) throw(IPCException)
    return _modules.count();
 }
 
-
-
-
-
-
 PEGASUS_NAMESPACE_END
 
 #endif // CIMOM_include