in agent/src/main/java/jetbrains/buildServer/torrent/AgentTorrentsManager.java [57:83]
public AgentTorrentsManager(@NotNull final EventDispatcher<AgentLifeCycleListener> eventDispatcher,
@NotNull final ArtifactCacheProvider artifactsCacheProvider,
@NotNull final CurrentBuildTracker currentBuildTracker,
@NotNull final TorrentConfiguration trackerManager,
@NotNull final AgentTorrentsSeeder torrentsSeeder,
@NotNull final TorrentFilesFactoryImpl torrentFilesFactory,
@NotNull final ArtifactsWatcherEx artifactsWatcher,
@NotNull final TorrentsDownloadStatistic torrentsDownloadStatistic,
@NotNull final LeechSettings leechSettings,
@NotNull final BuildAgentConfiguration agentConfiguration,
@NotNull final SeedSettings seedingSettings) throws Exception {
myLeechSettings = leechSettings;
mySeedingSettings = seedingSettings;
eventDispatcher.addListener(this);
myTrackerManager = trackerManager;
myTorrentsSeeder = torrentsSeeder;
torrensForPublishing = new ArrayList<String>();
myArtifactsWatcher = artifactsWatcher;
myTorrentsDownloadStatistic = torrentsDownloadStatistic;
artifactsCacheProvider.addListener(new TorrentArtifactCacheListener(
torrentsSeeder.getTorrentsSeeder(),
currentBuildTracker,
trackerManager,
this,
torrentFilesFactory,
agentConfiguration));
}