package org.gcube.portal.social_networking_client_library; import org.gcube.portal.social_networking_client_library.utils.ServiceDiscoverer; /** * Base client service. * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) */ public abstract class BaseClient { private String serviceEndpoint; public BaseClient(String subPath) throws Exception { ServiceDiscoverer discover = new ServiceDiscoverer(); serviceEndpoint = discover.getEntryPoint(); serviceEndpoint = serviceEndpoint.endsWith("/") ? serviceEndpoint + subPath : serviceEndpoint + "/" + subPath; } public String getServiceEndpoint() { return serviceEndpoint; } }