void ServiceRegistry::Get(const std::string& clazz, const std::string& filter, BundlePrivate* bundle, std::vector<ServiceReferenceBase>& res) const { this->Lock(), Get_unlocked(clazz, filter, bundle, res); }
ServiceReference ServiceRegistry::Get(ModulePrivate* module, const std::string& clazz) const { MutexLocker lock(mutex); try { std::list<ServiceReference> srs; Get_unlocked(clazz, "", module, srs); MITK_INFO << "get service ref " << clazz << " for module " << module->info.name << " = " << srs.size() << " refs"; if (!srs.empty()) { return srs.front(); } } catch (const std::invalid_argument& ) { } return ServiceReference(); }
ServiceReferenceBase ServiceRegistry::Get(BundlePrivate* bundle, const std::string& clazz) const { auto l = this->Lock(); US_UNUSED(l); try { std::vector<ServiceReferenceBase> srs; Get_unlocked(clazz, "", bundle, srs); DIAG_LOG(*core->sink) << "get service ref " << clazz << " for bundle " << bundle->symbolicName << " = " << srs.size() << " refs"; if (!srs.empty()) { return srs.back(); } } catch (const std::invalid_argument&) { } return ServiceReferenceBase(); }
void ServiceRegistry::Get(const std::string& clazz, const std::string& filter, ModulePrivate* module, std::list<ServiceReference>& res) const { MutexLocker lock(mutex); Get_unlocked(clazz, filter, module, res); }
void ServiceRegistry::Get( const std::string& clazz, std::vector<ServiceRegistrationBase>& serviceRegs) const { this->Lock(), Get_unlocked(clazz, serviceRegs); }