Fixed API
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor-client@131739 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
15032e4af8
commit
7270cc1e46
|
@ -92,7 +92,20 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
|||
@Override
|
||||
public PluginState getState(final String executionIdentifier)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
return getStateEvolution(executionIdentifier).getPluginState();
|
||||
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
|
||||
@Override
|
||||
public PluginState call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling getState(String) function");
|
||||
return endpoint.getState(executionIdentifier);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
return proxyDelegate.make(call);
|
||||
} catch (Exception e) {
|
||||
logger.debug("Failed to call getState(String) function");
|
||||
throw again(e).asServiceException();
|
||||
}
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
@ -122,7 +135,20 @@ public class DefaultSmartExecutorProxy implements SmartExecutorProxy {
|
|||
@Override
|
||||
public PluginState getIterationState(final String executionIdentifier, final int iterationNumber)
|
||||
throws PluginInstanceNotFoundException, ExecutorException {
|
||||
return getIterationStateEvolution(executionIdentifier, iterationNumber).getPluginState();
|
||||
Call<SmartExecutor, PluginState> call = new Call<SmartExecutor, PluginState>() {
|
||||
@Override
|
||||
public PluginState call(SmartExecutor endpoint) throws Exception {
|
||||
logger.debug("Calling getIterationState(String, int) function");
|
||||
return endpoint.getIterationState(executionIdentifier, iterationNumber);
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
return proxyDelegate.make(call);
|
||||
} catch (Exception e) {
|
||||
logger.debug("Failed to call getIterationState(String, int) function");
|
||||
throw again(e).asServiceException();
|
||||
}
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
|
Loading…
Reference in New Issue