Search in sources :

Example 1 with ServiceDiscoveryFactory

use of org.apache.dubbo.registry.client.ServiceDiscoveryFactory in project incubator-dubbo-ops by apache.

the class ConfigCenter method getServiceDiscoveryRegistry.

@Bean(destroyMethod = "destroy")
@DependsOn("dubboRegistry")
ServiceDiscovery getServiceDiscoveryRegistry() throws Exception {
    URL registryURL = registryUrl.setPath(RegistryService.class.getName());
    ServiceDiscoveryFactory factory = getExtension(registryURL);
    ServiceDiscovery serviceDiscovery = factory.getServiceDiscovery(registryURL);
    serviceDiscovery.initialize(registryURL);
    return serviceDiscovery;
}
Also used : ServiceDiscoveryFactory(org.apache.dubbo.registry.client.ServiceDiscoveryFactory) RegistryService(org.apache.dubbo.registry.RegistryService) URL(org.apache.dubbo.common.URL) ServiceDiscovery(org.apache.dubbo.registry.client.ServiceDiscovery) DependsOn(org.springframework.context.annotation.DependsOn) Bean(org.springframework.context.annotation.Bean)

Aggregations

URL (org.apache.dubbo.common.URL)1 RegistryService (org.apache.dubbo.registry.RegistryService)1 ServiceDiscovery (org.apache.dubbo.registry.client.ServiceDiscovery)1 ServiceDiscoveryFactory (org.apache.dubbo.registry.client.ServiceDiscoveryFactory)1 Bean (org.springframework.context.annotation.Bean)1 DependsOn (org.springframework.context.annotation.DependsOn)1