@Test public void testGetService_ShouldReturnEmptyInstances() { Assert.assertTrue(CollectionUtils.isEmpty(_client.getService(Services.newDiscoverConfig()).getInstances())); }
public Service getService(final DiscoveryConfig discoveryConfig) { Preconditions.checkArgument(discoveryConfig != null, "discoveryConfig"); final List<Service> services = getServices(Lists.newArrayList(discoveryConfig)); if (services.size() > 0) { return services.get(0); } throw new RuntimeException("not found any service by discoveryConfig:" + discoveryConfig); }
ArtemisDiscoveryHttpClient extends ArtemisHttpClient { public Service getService(final DiscoveryConfig discoveryConfig) { Preconditions.checkArgument(discoveryConfig != null, "discoveryConfig"); final List<Service> services = getServices(Lists.newArrayList(discoveryConfig)); if (services.size() > 0) { return services.get(0); } throw new RuntimeException("not found any service by discoveryConfig:" + discoveryConfig); } }
ArtemisDiscoveryHttpClient extends ArtemisHttpClient { public Service getService(final DiscoveryConfig discoveryConfig) { Preconditions.checkArgument(discoveryConfig != null, "discoveryConfig"); final List<Service> services = getServices(Lists.newArrayList(discoveryConfig)); if (services.size() > 0) { return services.get(0); } throw new RuntimeException("not found any service by discoveryConfig:" + discoveryConfig); } ArtemisDiscoveryHttpClient(final ArtemisClientConfig config); }
ArtemisDiscoveryHttpClient extends ArtemisHttpClient { public Service getService(final DiscoveryConfig discoveryConfig) { Preconditions.checkArgument(discoveryConfig != null, "discoveryConfig"); final List<Service> services = getServices(Lists.newArrayList(discoveryConfig)); if (services.size() > 0) { return services.get(0); } throw new RuntimeException("not found any service by discoveryConfig:" + discoveryConfig); } ArtemisDiscoveryHttpClient(final ArtemisClientConfig config); Service getService(final DiscoveryConfig discoveryConfig); List<Service> getServices(final List<DiscoveryConfig> discoveryConfigs); }
ArtemisDiscoveryHttpClient extends ArtemisHttpClient { public Service getService(final DiscoveryConfig discoveryConfig) { Preconditions.checkArgument(discoveryConfig != null, "discoveryConfig"); final List<Service> services = getServices(Lists.newArrayList(discoveryConfig)); if (services.size() > 0) { return services.get(0); } throw new RuntimeException("not found any service by discoveryConfig:" + discoveryConfig); } ArtemisDiscoveryHttpClient(final ArtemisClientConfig config); Service getService(final DiscoveryConfig discoveryConfig); List<Service> getServices(final List<DiscoveryConfig> discoveryConfigs);  }