Java Code Examples for com.alibaba.dubbo.registry.common.domain.Provider#toUrl()

The following examples show how to use com.alibaba.dubbo.registry.common.domain.Provider#toUrl() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProviderServiceImpl.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public void updateProvider(Provider provider) {
    Long id = provider.getId();
    if(id == null) {
        throw new IllegalStateException("no provider id");
    }
    
    URL oldProvider = findProviderUrl(id);
    if(oldProvider == null) {
        throw new IllegalStateException("Provider was changed!");
    }
    URL newProvider = provider.toUrl();
    
    registryService.unregister(oldProvider);
    registryService.register(newProvider);
}
 
Example 2
Source File: ProviderServiceImpl.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
public void updateProvider(Provider provider) {
    Long id = provider.getId();
    if(id == null) {
        throw new IllegalStateException("no provider id");
    }
    
    URL oldProvider = findProviderUrl(id);
    if(oldProvider == null) {
        throw new IllegalStateException("Provider was changed!");
    }
    URL newProvider = provider.toUrl();
    
    registryService.unregister(oldProvider);
    registryService.register(newProvider);
}
 
Example 3
Source File: ProviderServiceImpl.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
public void updateProvider(Provider provider) {
    Long id = provider.getId();
    if(id == null) {
        throw new IllegalStateException("no provider id");
    }
    
    URL oldProvider = findProviderUrl(id);
    if(oldProvider == null) {
        throw new IllegalStateException("Provider was changed!");
    }
    URL newProvider = provider.toUrl();
    
    registryService.unregister(oldProvider);
    registryService.register(newProvider);
}
 
Example 4
Source File: ProviderServiceImpl.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public void updateProvider(Provider provider) {
    Long id = provider.getId();
    if(id == null) {
        throw new IllegalStateException("no provider id");
    }
    
    URL oldProvider = findProviderUrl(id);
    if(oldProvider == null) {
        throw new IllegalStateException("Provider was changed!");
    }
    URL newProvider = provider.toUrl();
    
    registryService.unregister(oldProvider);
    registryService.register(newProvider);
}
 
Example 5
Source File: ProviderServiceImpl.java    From dubbox with Apache License 2.0 5 votes vote down vote up
public void updateProvider(Provider provider) {
    Long id = provider.getId();
    if(id == null) {
        throw new IllegalStateException("no provider id");
    }
    
    URL oldProvider = findProviderUrl(id);
    if(oldProvider == null) {
        throw new IllegalStateException("Provider was changed!");
    }
    URL newProvider = provider.toUrl();
    
    registryService.unregister(oldProvider);
    registryService.register(newProvider);
}
 
Example 6
Source File: ProviderServiceImpl.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public void create(Provider provider) {
    URL url = provider.toUrl();
    registryService.register(url);
}
 
Example 7
Source File: ProviderServiceImpl.java    From dubbox-hystrix with Apache License 2.0 4 votes vote down vote up
public void create(Provider provider) {
    URL url = provider.toUrl();
    registryService.register(url);
}
 
Example 8
Source File: ProviderServiceImpl.java    From dubbo3 with Apache License 2.0 4 votes vote down vote up
public void create(Provider provider) {
    URL url = provider.toUrl();
    registryService.register(url);
}
 
Example 9
Source File: ProviderServiceImpl.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public void create(Provider provider) {
    URL url = provider.toUrl();
    registryService.register(url);
}
 
Example 10
Source File: ProviderServiceImpl.java    From dubbox with Apache License 2.0 4 votes vote down vote up
public void create(Provider provider) {
    URL url = provider.toUrl();
    registryService.register(url);
}