当前位置: 首页>>代码示例>>C++>>正文


C++ MeshPtr::createRemoteService方法代码示例

本文整理汇总了C++中MeshPtr::createRemoteService方法的典型用法代码示例。如果您正苦于以下问题:C++ MeshPtr::createRemoteService方法的具体用法?C++ MeshPtr::createRemoteService怎么用?C++ MeshPtr::createRemoteService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MeshPtr的用法示例。


在下文中一共展示了MeshPtr::createRemoteService方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: startService

void SthenoCore::startService(const UUIDPtr& sid, ServiceParamsPtr& params, UUIDPtr& iid, UUIDPtr& deployUUIDD) throw (RuntimeException&, ServiceException&) {
    ACE_Time_Value start = ACE_OS::gettimeofday();
    if (!isValid()) {
        throw RuntimeException(RuntimeException::INVALID_RUNTIME);
    }
    list<UUIDPtr> filterList;
    UUIDPtr runtimeUUID;
    this->getUUID(runtimeUUID);
    LaunchServiceSiteQuery* query = new LaunchServiceSiteQuery(runtimeUUID, sid, filterList);
    DiscoveryPtr discovery;
    try {
        m_overlay->getDiscovery(discovery);
    } catch (OverlayException& ex) {
        throw RuntimeException(RuntimeException::INVALID_OVERLAY);
    }
    //DiscoveryQueryReply* reply = m_overlay->getDiscovery()->executeQuery(query);
    DiscoveryQueryReply* reply = discovery->executeQuery(query);
    if (reply == 0) {
        throw RuntimeException(RuntimeException::INVALID_OVERLAY);
    }
    LaunchServiceSiteQueryReply* replyNarrow = new LaunchServiceSiteQueryReply(reply);
    //printf("PoL UUID=%s\n", replyNarrow->getUUID()->toString().c_str());
    deployUUIDD = replyNarrow->getUUID();
    //printf("Before service remote deployment\n");
    MeshPtr meshPtr;
    try {
        getOverlay()->getMesh(meshPtr);
    } catch (OverlayException& ex) {
        throw RuntimeException(RuntimeException::INVALID_OVERLAY);
    }
    //getOverlay()->getMesh()->createRemoteService(replyNarrow->getMeshSAPInfo().get(), replyNarrow->getUUID(), sid, params, iid);
    try {
        meshPtr->createRemoteService(replyNarrow->getMeshSAPInfo().get(), replyNarrow->getUUID(), sid, params, iid);
    } catch (ServiceException& se) {
        delete replyNarrow;
        throw se;
    }
    //printf("After service remote deployment\n");
    ACE_Time_Value end = ACE_OS::gettimeofday();
    end -= start;
    if (trace()) {
        MeshPtr meshPtr;
        this->getOverlay()->getMesh(meshPtr);
        UUIDPtr fid;
        meshPtr->getFID(fid);
        if (params->getFTParams().null()) {
            TraceRuntimeSingleton::instance()->logRemoteServiceCreation(this->m_peerID, fid, sid, iid, end);
        } else {
            TraceRuntimeSingleton::instance()->logRemoteServiceCreationFT(this->m_peerID, fid, sid, iid, end);
        }
    }
    delete replyNarrow;
}
开发者ID:edenduthie,项目名称:rtft1,代码行数:53,代码来源:SthenoCore.cpp


注:本文中的MeshPtr::createRemoteService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。