Example usage for org.eclipse.jgit.transport HttpTransport setConnectionFactory

List of usage examples for org.eclipse.jgit.transport HttpTransport setConnectionFactory

Introduction

In this page you can find the example usage for org.eclipse.jgit.transport HttpTransport setConnectionFactory.

Prototype

public static void setConnectionFactory(HttpConnectionFactory cf) 

Source Link

Document

Set the org.eclipse.jgit.transport.http.HttpConnectionFactory to be used to create new connections

Usage

From source file:jetbrains.buildServer.buildTriggers.vcs.git.TransportFactoryImpl.java

License:Apache License

public TransportFactoryImpl(@NotNull ServerPluginConfig config, @NotNull VcsRootSshKeyManager sshKeyManager) {
    myConfig = config;/*from w  w w. java 2 s . c o  m*/
    myJSchOptions = getJSchCipherOptions();
    mySshKeyManager = sshKeyManager;
    String factoryName = myConfig.getHttpConnectionFactory();
    HttpConnectionFactory f;
    if ("httpClient".equals(factoryName)) {
        f = new SNIHttpClientConnectionFactory();
    } else if ("httpClientNoSNI".equals(factoryName)) {
        f = new HttpClientConnectionFactory();
    } else {
        f = new TeamCityJDKHttpConnectionFactory(myConfig);
    }
    HttpTransport.setConnectionFactory(f);
}