class EngineFactory {

  public T_ENGINE getInstance(String algorithm) throws GeneralSecurityException {
    Exception cause = null;
    for (Provider provider : this.policy) {
      try {
        return this.instanceBuilder.getInstance(algorithm, provider);
      } catch (Exception e) {
        if (cause == null) {
          cause = e;
        }
      }
    }
    if (letFallback) {
      return this.instanceBuilder.getInstance(algorithm, null);
    }
    throw new GeneralSecurityException("No good Provider found.", cause);
  }

  public  EngineFactory(T_WRAPPER instanceBuilder);
  public  EngineFactory(T_WRAPPER instanceBuilder, List<Provider> policy);
  public  EngineFactory(T_WRAPPER instanceBuilder, List<Provider> policy, boolean letFallback);

}