in agent/src/main/java/jetbrains/buildServer/torrent/TorrentTransportFactory.java [102:123]
public URLContentRetriever getTransport(@NotNull Map<String, String> context) {
final BuildProgressLogger buildLogger = myBuildTracker.getCurrentBuild().getBuildLogger();
if (!shouldUseTorrentTransport()) {
TorrentUtil.log2Build("BitTorrent artifacts transport is disabled in server settings", buildLogger);
return null;
}
if (!myAgentTorrentsManager.isTransportEnabled()) {
return null;
}
String serverUrl = myAgentConfig.getServerUrl();
HttpClient httpClient = createHttpClient();
return new TorrentTransport(myAgentTorrentsManager.getTorrentsSeeder(),
new HttpDownloaderImpl(httpClient),
buildLogger,
myAgentTorrentsManager.getTorrentsDownloadStatistic(),
myLeechSettings,
myTorrentFilesFactory,
new HttpTransport(httpClient, serverUrl));
}