Added the possibility to create a client instance by context

This commit is contained in:
Luca Frosini 2023-02-27 18:55:32 +01:00
parent c84c4e4c78
commit 5f3bcda570
1 changed files with 6 additions and 0 deletions

View File

@ -17,5 +17,11 @@ public class ResourceRegistrySchemaClientFactory {
logger.trace("The {} will be contacted at {}", Constants.SERVICE_NAME, address);
return new ResourceRegistrySchemaClientImpl(address);
}
public static ResourceRegistrySchemaClient create(String context) {
String address = String.format("%s/%s", ServiceInstance.getServiceURL(context),Constants.SERVICE_NAME);
logger.trace("The {} will be contacted at {}", Constants.SERVICE_NAME, address);
return new ResourceRegistrySchemaClientImpl(address);
}
}