class LdapProtocolFactory {

  public LdapProtocol createLdapProtocol( IVariables variables, ILdapMeta meta,
                                          Collection<String> binaryAttributes ) throws HopException {
    String connectionType = variables.environmentSubstitute( meta.getProtocol() );

    synchronized ( protocols ) {
      for ( Class<? extends LdapProtocol> protocol : protocols ) {
        if ( getName( protocol ).equals( connectionType ) ) {
          try {
            return protocol.getConstructor(
              ILogChannel.class,
              IVariables.class,
              ILdapMeta.class,
              Collection.class ).newInstance( log, variables, meta, binaryAttributes );
          } catch ( Exception e ) {
            throw new HopException( e );
          }
        }
      }
    }
    return null;
  }

  public  LdapProtocolFactory( ILogChannel log );

}