Commit 2a63d071 by Nastya Smirnova Committed by Spencer Gibb

Extract getApplications method in CommonsInstanceDiscovery

This allows the ability to override behavior of retrieving configured applications
parent c8d024c2
......@@ -95,7 +95,7 @@ public class CommonsInstanceDiscovery implements InstanceDiscovery {
@Override
public Collection<Instance> getInstanceList() throws Exception {
List<Instance> instances = new ArrayList<>();
List<String> appNames = getTurbineProperties().getAppConfigList();
List<String> appNames = getApplications();
if (appNames == null || appNames.size() == 0) {
log.info("No apps configured, returning an empty instance list");
return instances;
......@@ -120,6 +120,10 @@ public class CommonsInstanceDiscovery implements InstanceDiscovery {
return instances;
}
protected List<String> getApplications() {
return turbineProperties.getAppConfigList();
}
/**
* helper that fetches the Instances for each application from DiscoveryClient.
* @param serviceId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment