use of org.apache.dubbo.admin.registry.mapping.impl.NoOpServiceMapping in project incubator-dubbo-ops by apache.
the class ConfigCenter method getServiceMapping.
@Bean
@DependsOn("metaDataCollector")
ServiceMapping getServiceMapping(ServiceDiscovery serviceDiscovery, InstanceRegistryCache instanceRegistryCache) {
ServiceMapping serviceMapping = new NoOpServiceMapping();
if (metadataUrl == null) {
return serviceMapping;
}
MappingListener mappingListener = new AdminMappingListener(serviceDiscovery, instanceRegistryCache);
serviceMapping = ExtensionLoader.getExtensionLoader(ServiceMapping.class).getExtension(metadataUrl.getProtocol());
serviceMapping.addMappingListener(mappingListener);
serviceMapping.init(metadataUrl);
return serviceMapping;
}
Aggregations