Implementing client

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@111722 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-02-05 11:49:08 +00:00
parent 4603937064
commit bd48f86cbe
2 changed files with 19 additions and 1 deletions

View File

@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*/
public class DefaultExecutor implements Executor {
public class DefaultExecutor implements ExecutorProxy {
/**
* Logger
@ -43,6 +43,7 @@ public class DefaultExecutor implements Executor {
@Override
public String call(Executor endpoint) throws Exception {
logger.debug("Calling launch() function");
return endpoint.launch(launchParameter);
}
};
@ -50,6 +51,7 @@ public class DefaultExecutor implements Executor {
try {
return proxyDelegate.make(call);
} catch (Exception e) {
logger.debug("Failed to call launch() function");
throw again(e).asServiceException();
}
@ -63,6 +65,7 @@ public class DefaultExecutor implements Executor {
Call<Executor, PluginState> call = new Call<Executor, PluginState>() {
@Override
public PluginState call(Executor endpoint) throws Exception {
logger.debug("Calling getState() function");
return endpoint.getState(executionIdentifier);
}
};
@ -70,6 +73,7 @@ public class DefaultExecutor implements Executor {
try {
return proxyDelegate.make(call);
} catch (Exception e) {
logger.debug("Failed to call getState() function");
throw again(e).asServiceException();
}
}

View File

@ -0,0 +1,14 @@
/**
*
*/
package org.gcube.vremanagement.executor.client;
import org.gcube.vremanagement.executor.api.Executor;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*
*/
public interface ExecutorProxy extends Executor {
}