class SecureComputationEngineImpl implements SecureComputationEngine<ResourcePoolT, BuilderT> {

  @Override
  public <OutputT> OutputT runApplication(Application<OutputT, BuilderT> application,
      ResourcePoolT resourcePool, Network network, Duration timeout) {
    Future<OutputT> future = startApplication(application, resourcePool, network);
    try {
      return future.get(timeout.toNanos(), TimeUnit.NANOSECONDS);
    } catch (InterruptedException | TimeoutException e) {
      throw new RuntimeException("Internal error in waiting", e);
    } catch (ExecutionException e) {
      throw new RuntimeException("Execution exception when running the application", e.getCause());
    }
  }

  public  SecureComputationEngineImpl(ProtocolSuite<ResourcePoolT, BuilderT> protocolSuite,
      ProtocolEvaluator<ResourcePoolT> evaluator);

}