use of org.apache.dubbo.registry.client.ServiceInstanceCustomizer in project dubbo by alibaba.
the class DubboBootstrap method createServiceInstance.
private ServiceInstance createServiceInstance(String serviceName, String host, int port) {
this.serviceInstance = new DefaultServiceInstance(serviceName, host, port);
setMetadataStorageType(serviceInstance, getMetadataType());
ExtensionLoader<ServiceInstanceCustomizer> loader = ExtensionLoader.getExtensionLoader(ServiceInstanceCustomizer.class);
// FIXME, sort customizer before apply
loader.getSupportedExtensionInstances().forEach(customizer -> {
// customizes
customizer.customize(this.serviceInstance);
});
return this.serviceInstance;
}
Aggregations