⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jmpiprovidermanager.cpp

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 CPP
📖 第 1 页 / 共 5 页
字号:
            JMPIjvm::checkException(env);            handler.processing();            if (jAr) {                for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {                    JMPIjvm::checkException(env);                    jobject jciRet = env->GetObjectArrayElement(jAr,i);                    JMPIjvm::checkException(env);                    jlong        jciRetRef = env->CallLongMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);                    CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jlong, CIMInstance*, jciRetRef);                    /* Fix for 4237 */                    CIMClass cls;                    try                    {                       DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));                       AutoMutex lock (pr._cimomMutex);                       cls = pr._cimom_handle->getClass(context,                                                        request->nameSpace,                                                        ciRet->getClassName(),                                                        false,                                                        true,                                                        true,                                                        CIMPropertyList());                       DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));                    }                    catch (CIMException e)                    {                       DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));                       throw;                    }                    const CIMObjectPath& op  = ciRet->getPath();                    CIMObjectPath        iop = ciRet->buildPath(cls);                    JMPIjvm::checkException(env);                    handler.deliver(*ciRet);                }            }            handler.complete();            break;        }        case METHOD_CIMINSTANCEPROVIDER2:        {            jlong   jocRef = DEBUG_ConvertCToJava (OperationContext*, jlong, &request->operationContext);            jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewJ,jocRef);            jlong   jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jlong, objectPath);            jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewJ,jcopRef);            JMPIjvm::checkException(env);            CIMClass cls;            try            {               DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));               AutoMutex lock (pr._cimomMutex);               cls = pr._cimom_handle->getClass(context,                                                request->nameSpace,                                                request->className,                                                false,                                                true,                                                true,                                                CIMPropertyList());               DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));            }            catch (CIMException e)            {               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));               throw;            }            CIMClass *pcls = new CIMClass (cls);            JMPIjvm::checkException(env);            jlong   jccRef = DEBUG_ConvertCToJava (CIMClass*, jlong, pcls);            jobject jcc    = env->NewObject(jv->CIMClassClassRef,jv->CIMClassNewJ,jccRef);            JMPIjvm::checkException(env);            jobjectArray jPropertyList = getList(jv,env,request->propertyList);            StatProviderTimeMeasurement providerTime(response);            jobjectArray jAr           = (jobjectArray)env->CallObjectMethod((jobject)pr.jProvider,                                                                             id,                                                                             joc,                                                                             jcop,                                                                             jcc,                                                                             JMPI_INCLUDE_QUALIFIERS,                                                                             request->includeClassOrigin,                                                                             jPropertyList);            JMPIjvm::checkException(env);            if (joc)            {               env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);               JMPIjvm::checkException(env);            }            handler.processing();            if (jAr) {                for (int i=0,m=env->GetArrayLength(jAr); i<m; i++) {                    JMPIjvm::checkException(env);                    jobject jciRet = env->GetObjectArrayElement(jAr,i);                    JMPIjvm::checkException(env);                    jlong        jciRetRef = env->CallLongMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);                    CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jlong, CIMInstance*, jciRetRef);                    /* Fix for 4237 */                    CIMClass cls;                    try                    {                       DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));                       AutoMutex lock (pr._cimomMutex);                       cls = pr._cimom_handle->getClass(context,                                                        request->nameSpace,                                                        ciRet->getClassName(),                                                        false,                                                        true,                                                        true,                                                        CIMPropertyList());                       DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));                    }                    catch (CIMException e)                    {                       DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));                       throw;                    }                    const CIMObjectPath& op  = ciRet->getPath();                    CIMObjectPath        iop = ciRet->buildPath(cls);                    JMPIjvm::checkException(env);                    handler.deliver(*ciRet);                }            }            handler.complete();            break;        }        /* Fix for 4189 */        case METHOD_INSTANCEPROVIDER2:        {            jlong   jocRef = DEBUG_ConvertCToJava (OperationContext*, jlong, &request->operationContext);            jobject joc    = env->NewObject(jv->OperationContextClassRef,jv->OperationContextNewJ,jocRef);            jlong   jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jlong, objectPath);            jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewJ,jcopRef);            JMPIjvm::checkException(env);            CIMClass cls;            try            {               DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));               AutoMutex lock (pr._cimomMutex);               cls = pr._cimom_handle->getClass (context,                                                 request->nameSpace,                                                 request->className,                                                 false,                                                 true,                                                 true,                                                 CIMPropertyList());               DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl));            }            catch (CIMException e)            {               DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));               throw;            }            CIMClass *pcls = new CIMClass (cls);            JMPIjvm::checkException(env);            jlong   jccRef = DEBUG_ConvertCToJava (CIMClass*, jlong, pcls);            jobject jcc    = env->NewObject(jv->CIMClassClassRef,jv->CIMClassNewJ,jccRef);            JMPIjvm::checkException(env);            jobjectArray jPropertyList = getList(jv,env,request->propertyList);            StatProviderTimeMeasurement providerTime(response);            jobject      jVec          = env->CallObjectMethod((jobject)pr.jProvider,                                                               id,                                                               joc,                                                               jcop,                                                               jcc,                                                               JMPI_INCLUDE_QUALIFIERS,                                                               request->includeClassOrigin,                                                               jPropertyList);            JMPIjvm::checkException(env);            if (joc)            {               env->CallVoidMethod (joc, JMPIjvm::jv.OperationContextUnassociate);               JMPIjvm::checkException(env);            }            handler.processing();            if (jVec) {                for (int i=0,m=env->CallIntMethod(jVec,JMPIjvm::jv.VectorSize); i<m; i++) {                    JMPIjvm::checkException(env);                    jobject jciRet = env->CallObjectMethod(jVec,JMPIjvm::jv.VectorElementAt,i);                    JMPIjvm::checkException(env);                    jlong        jciRetRef = env->CallLongMethod(jciRet,JMPIjvm::jv.CIMInstanceCInst);                    CIMInstance *ciRet     = DEBUG_ConvertJavaToC (jlong, CIMInstance*, jciRetRef);                    /* Fix for 4237 */                    CIMClass             cls;                    try                    {                       DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));                       AutoMutex lock (pr._cimomMutex);                       cls = pr._cimom_handle->getClass(context,                                                        request->nameSpace,                                                        ciRet->getClassName(),                                                        false,                                                        true,                                                        true,                                                        CIMPropertyList());                       DDD (PEGASUS_STD(cout)<<"exit: cimom_handle->getClass("<<__LINE__<<") "<<ciRet->getClassName()<<PEGASUS_STD(endl));                    }                    catch (CIMException e)                    {                       DDD (PEGASUS_STD(cout)<<"--- JMPIProviderManager::handleEnumerateInstancesRequest: Error: Caught CIMExcetion during cimom_handle->getClass("<<__LINE__<<") "<<PEGASUS_STD(endl));                       throw;                    }                    const CIMObjectPath& op  = ciRet->getPath();                    CIMObjectPath        iop = ciRet->buildPath(cls);                    JMPIjvm::checkException(env);                    iop.setNameSpace(op.getNameSpace());                    ciRet->setPath(iop);                    /* Fix for 4237*/                    handler.deliver(*ciRet);                }            }            handler.complete();            break;        }        /* Fix for 4189 */        case METHOD_INSTANCEPROVIDER:        {            jlong   jcopRef = DEBUG_ConvertCToJava (CIMObjectPath*, jlong, objectPath);            jobject jcop    = env->NewObject(jv->CIMObjectPathClassRef,jv->CIMObjectPathNewJ,jcopRef);            JMPIjvm::checkException(env);            CIMClass cls;            try            {               DDD (PEGASUS_STD(cout)<<"enter: cimom_handle->getClass("<<__LINE__<<") "<<request->className<<PEGASUS_STD(endl))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -