public class TrackerManager extends Object
| Constructor and Description |
|---|
TrackerManager(IPeerConnector peerConnector,
TrackerFactory trackerFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTorrent(Torrent torrent,
String trackerUrl)
Adds the torrent to the tracker and registers the tracker.
|
void |
announce(Torrent torrent)
Invokes the
ITracker.announce(Torrent) method for all trackers having the given torrent. |
int |
getConnectingCountFor(Torrent torrent)
Calculates how many connections are assigned to the torrent but haven't passed the BitTorrent handshake yet.
|
List<ITracker> |
getTrackersFor(Torrent torrent)
Gets all trackers which know the given torrent
|
public TrackerManager(IPeerConnector peerConnector, TrackerFactory trackerFactory)
public void announce(Torrent torrent)
ITracker.announce(Torrent) method for all trackers having the given torrent.torrent - The torrent to announce.public void addTorrent(Torrent torrent, String trackerUrl)
torrent - The torrent to addtrackerUrl - The tracker urlpublic int getConnectingCountFor(Torrent torrent)
torrent - The torrent for which connections must be counted.Copyright © 2016. All rights reserved.