@Test(expected = IllegalArgumentException.class) public void testUpdateServerListInvalid2() { ListNamingService namingService = new ListNamingService(new BrpcURL("1.1.1.1,2.2.2.2")); namingService.lookup(null); }
@Override public List<ServiceInstance> lookup(SubscribeInfo subscribeInfo) { for (ServiceInstance instance : instances) { if (subscribeInfo != null && StringUtils.isNoneBlank(subscribeInfo.getServiceId())) { instance.setServiceName(subscribeInfo.getServiceId()); } } return instances; }
ListNamingService implements NamingService { @Override public List<ServiceInstance> lookup(SubscribeInfo subscribeInfo) { for (ServiceInstance instance : instances) { if (subscribeInfo != null && StringUtils.isNoneBlank(subscribeInfo.getServiceId())) { instance.setServiceName(subscribeInfo.getServiceId()); } } return instances; } }
ListNamingService implements NamingService { @Override public List<ServiceInstance> lookup(SubscribeInfo subscribeInfo) { for (ServiceInstance instance : instances) { if (subscribeInfo != null && StringUtils.isNoneBlank(subscribeInfo.getServiceId())) { instance.setServiceName(subscribeInfo.getServiceId()); } } return instances; } ListNamingService(BrpcURL namingUrl); }
ListNamingService implements NamingService { @Override public List<ServiceInstance> lookup(SubscribeInfo subscribeInfo) { for (ServiceInstance instance : instances) { if (subscribeInfo != null && StringUtils.isNoneBlank(subscribeInfo.getServiceId())) { instance.setServiceName(subscribeInfo.getServiceId()); } } return instances; } ListNamingService(BrpcURL namingUrl); @Override List<ServiceInstance> lookup(SubscribeInfo subscribeInfo); @Override void subscribe(SubscribeInfo subscribeInfo, final NotifyListener listener); @Override void unsubscribe(SubscribeInfo subscribeInfo); @Override void register(RegisterInfo registerInfo); @Override void unregister(RegisterInfo registerInfo); @Override void destroy(); }
ListNamingService implements NamingService { @Override public List<ServiceInstance> lookup(SubscribeInfo subscribeInfo) { for (ServiceInstance instance : instances) { if (subscribeInfo != null && StringUtils.isNoneBlank(subscribeInfo.getServiceId())) { instance.setServiceName(subscribeInfo.getServiceId()); } } return instances; } ListNamingService(BrpcURL namingUrl); @Override List<ServiceInstance> lookup(SubscribeInfo subscribeInfo); @Override void subscribe(SubscribeInfo subscribeInfo, final NotifyListener listener); @Override void unsubscribe(SubscribeInfo subscribeInfo); @Override void register(RegisterInfo registerInfo); @Override void unregister(RegisterInfo registerInfo); @Override void destroy();  }