本文整理汇总了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;
}