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:
parent
4603937064
commit
bd48f86cbe
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
||||
}
|
Loading…
Reference in New Issue