resource-registry-client/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientFacto...

22 lines
747 B
Java

package org.gcube.informationsystem.resourceregistry.client;
import org.gcube.informationsystem.resourceregistry.api.Constants;
import org.gcube.informationsystem.resourceregistry.api.rest.ServiceInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class ResourceRegistryClientFactory {
private static final Logger logger = LoggerFactory.getLogger(ResourceRegistryClientFactory.class);
public static ResourceRegistryClient create() {
String address = String.format("%s/%s", ServiceInstance.getServiceURL(),Constants.SERVICE_NAME);
logger.trace("The {} will be contacted at {}", Constants.SERVICE_NAME, address);
return new ResourceRegistryClientImpl(address);
}
}