Added facilities to use the client outside of container
This commit is contained in:
parent
9be6bfa8ec
commit
1a55e93ebe
|
@ -12,14 +12,24 @@ public class ResourceRegistrySchemaClientFactory {
|
|||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceRegistrySchemaClientFactory.class);
|
||||
|
||||
public static ResourceRegistrySchemaClient create() {
|
||||
public static String getResourceRegistryURL() {
|
||||
String address = String.format("%s/%s", ServiceInstance.getServiceURL(),Constants.SERVICE_NAME);
|
||||
return address;
|
||||
}
|
||||
|
||||
public static String getResourceRegistryURL(String context) {
|
||||
String address = String.format("%s/%s", ServiceInstance.getServiceURL(context),Constants.SERVICE_NAME);
|
||||
return address;
|
||||
}
|
||||
|
||||
public static ResourceRegistrySchemaClient create() {
|
||||
String address = getResourceRegistryURL();
|
||||
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);
|
||||
String address = getResourceRegistryURL(context);
|
||||
logger.trace("The {} will be contacted at {}", Constants.SERVICE_NAME, address);
|
||||
return new ResourceRegistrySchemaClientImpl(address);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue