Changing service name from smart-executor to SmartExecutor
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@111915 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
751652d0c1
commit
4bb0c5417a
|
@ -3,16 +3,16 @@ package org.gcube.vremanagement.executor.client;
|
|||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.gcube.common.calls.jaxws.GcubeService;
|
||||
import org.gcube.vremanagement.executor.api.Executor;
|
||||
import org.gcube.vremanagement.executor.api.SmartExecutor;
|
||||
|
||||
public class Constants {
|
||||
|
||||
/* Must be the same of generated WEB-INF/gcube-app.xml */
|
||||
public static final String GCUBE_SERVICE_CLASS = "VREManagement";
|
||||
public static final String GCUBE_SERVICE_NAME = "smart-executor";
|
||||
public static final String GCUBE_SERVICE_NAME = "SmartExecutor";
|
||||
|
||||
public static final QName EXECUTOR_QNAME = new QName(Executor.TARGET_NAMESPACE, Executor.WEB_SERVICE_SERVICE_NAME);
|
||||
public static final GcubeService<Executor> executor = GcubeService.service().withName(EXECUTOR_QNAME).andInterface(Executor.class);
|
||||
public static final QName SMART_EXECUTOR_QNAME = new QName(SmartExecutor.TARGET_NAMESPACE, SmartExecutor.WEB_SERVICE_SERVICE_NAME);
|
||||
public static final GcubeService<SmartExecutor> smartExecutor = GcubeService.service().withName(SMART_EXECUTOR_QNAME).andInterface(SmartExecutor.class);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.gcube.vremanagement.executor.client.plugins;
|
||||
|
||||
import org.gcube.common.clients.Plugin;
|
||||
import org.gcube.vremanagement.executor.api.Executor;
|
||||
import org.gcube.vremanagement.executor.api.SmartExecutor;
|
||||
import org.gcube.vremanagement.executor.client.Constants;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ public abstract class AbstractPlugin<S,P> implements Plugin<S,P> {
|
|||
|
||||
@Override
|
||||
public String namespace() {
|
||||
return Executor.TARGET_NAMESPACE;
|
||||
return SmartExecutor.TARGET_NAMESPACE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,25 +10,25 @@ import org.gcube.common.clients.ProxyBuilder;
|
|||
import org.gcube.common.clients.ProxyBuilderImpl;
|
||||
import org.gcube.common.clients.config.ProxyConfig;
|
||||
import org.gcube.common.clients.delegates.ProxyDelegate;
|
||||
import org.gcube.vremanagement.executor.api.Executor;
|
||||
import org.gcube.vremanagement.executor.api.SmartExecutor;
|
||||
import org.gcube.vremanagement.executor.client.Constants;
|
||||
import org.gcube.vremanagement.executor.client.proxies.DefaultExecutorProxy;
|
||||
import org.gcube.vremanagement.executor.client.proxies.ExecutorProxy;
|
||||
import org.gcube.vremanagement.executor.client.proxies.DefaultSmartExecutorProxy;
|
||||
import org.gcube.vremanagement.executor.client.proxies.SmartExecutorProxy;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
*
|
||||
*/
|
||||
public class ExecutorPlugin extends AbstractPlugin<Executor, ExecutorProxy> {
|
||||
public class ExecutorPlugin extends AbstractPlugin<SmartExecutor, SmartExecutorProxy> {
|
||||
|
||||
private static final ExecutorPlugin executorPlugin = new ExecutorPlugin();
|
||||
|
||||
public static ProxyBuilder<ExecutorProxy> getExecutorProxy() {
|
||||
return new ProxyBuilderImpl<Executor, ExecutorProxy>(executorPlugin);
|
||||
public static ProxyBuilder<SmartExecutorProxy> getExecutorProxy() {
|
||||
return new ProxyBuilderImpl<SmartExecutor, SmartExecutorProxy>(executorPlugin);
|
||||
}
|
||||
|
||||
public ExecutorPlugin(){
|
||||
super(Executor.WEB_SERVICE_SERVICE_NAME);
|
||||
super(SmartExecutor.WEB_SERVICE_SERVICE_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,14 +37,14 @@ public class ExecutorPlugin extends AbstractPlugin<Executor, ExecutorProxy> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ExecutorProxy newProxy(ProxyDelegate<Executor> proxyDelegate) {
|
||||
return new DefaultExecutorProxy(proxyDelegate);
|
||||
public SmartExecutorProxy newProxy(ProxyDelegate<SmartExecutor> proxyDelegate) {
|
||||
return new DefaultSmartExecutorProxy(proxyDelegate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Executor resolve(EndpointReference endpoint, ProxyConfig<?, ?> proxyConfig)
|
||||
public SmartExecutor resolve(EndpointReference endpoint, ProxyConfig<?, ?> proxyConfig)
|
||||
throws Exception {
|
||||
return StubFactory.stubFor(Constants.executor).at(endpoint);
|
||||
return StubFactory.stubFor(Constants.smartExecutor).at(endpoint);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import static org.gcube.common.clients.exceptions.FaultDSL.again;
|
|||
|
||||
import org.gcube.common.clients.Call;
|
||||
import org.gcube.common.clients.delegates.ProxyDelegate;
|
||||
import org.gcube.vremanagement.executor.api.Executor;
|
||||
import org.gcube.vremanagement.executor.api.SmartExecutor;
|
||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||
import org.gcube.vremanagement.executor.exception.ExecutorException;
|
||||
import org.gcube.vremanagement.executor.exception.InputsNullException;
|
||||
|
@ -21,16 +21,16 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
*/
|
||||
public class DefaultExecutorProxy implements ExecutorProxy {
|
||||
public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
||||
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
private static Logger logger = LoggerFactory.getLogger(DefaultExecutorProxy.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(DefaultSmartExecutorProxy.class);
|
||||
|
||||
private ProxyDelegate<Executor> proxyDelegate;
|
||||
private ProxyDelegate<SmartExecutor> proxyDelegate;
|
||||
|
||||
public DefaultExecutorProxy(ProxyDelegate<Executor> proxyDelegate) {
|
||||
public DefaultSmartExecutorProxy(ProxyDelegate<SmartExecutor> proxyDelegate) {
|
||||
this.proxyDelegate = proxyDelegate;
|
||||
}
|
||||
|
||||
|
@ -40,9 +40,9 @@ public class DefaultExecutorProxy implements ExecutorProxy {
|
|||
throws InputsNullException, PluginNotFoundException,
|
||||
LaunchException, ExecutorException {
|
||||
|
||||
Call<Executor, String> call = new Call<Executor, String>() {
|
||||
Call<SmartExecutor, String> call = new Call<SmartExecutor, String>() {
|
||||
@Override
|
||||
public String call(Executor endpoint) throws Exception {
|
||||
public String call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling launch() function");
|
||||
return endpoint.launch(launchParameter);
|
||||
}
|
||||
|
@ -62,9 +62,9 @@ public class DefaultExecutorProxy implements ExecutorProxy {
|
|||
public PluginState getState(final String executionIdentifier)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
|
||||
Call<Executor, PluginState> call = new Call<Executor, PluginState>() {
|
||||
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
|
||||
@Override
|
||||
public PluginState call(Executor endpoint) throws Exception {
|
||||
public PluginState call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling getState() function");
|
||||
return endpoint.getState(executionIdentifier);
|
||||
}
|
|
@ -3,12 +3,12 @@
|
|||
*/
|
||||
package org.gcube.vremanagement.executor.client.proxies;
|
||||
|
||||
import org.gcube.vremanagement.executor.api.Executor;
|
||||
import org.gcube.vremanagement.executor.api.SmartExecutor;
|
||||
|
||||
/**
|
||||
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
||||
*
|
||||
*/
|
||||
public interface ExecutorProxy extends Executor {
|
||||
public interface SmartExecutorProxy extends SmartExecutor {
|
||||
|
||||
}
|
|
@ -10,7 +10,7 @@ import java.util.UUID;
|
|||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.vremanagement.executor.api.types.LaunchParameter;
|
||||
import org.gcube.vremanagement.executor.client.plugins.ExecutorPlugin;
|
||||
import org.gcube.vremanagement.executor.client.proxies.ExecutorProxy;
|
||||
import org.gcube.vremanagement.executor.client.proxies.SmartExecutorProxy;
|
||||
import org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException;
|
||||
import org.gcube.vremanagement.executor.exception.PluginNotFoundException;
|
||||
import org.gcube.vremanagement.executor.plugin.PluginState;
|
||||
|
@ -24,7 +24,7 @@ import org.junit.Test;
|
|||
*/
|
||||
public class DefaultExecutorTest {
|
||||
|
||||
private ExecutorProxy proxy;
|
||||
private SmartExecutorProxy proxy;
|
||||
|
||||
@Before
|
||||
public void init(){
|
||||
|
|
Loading…
Reference in New Issue