public class HttpTracker extends Object implements Tracker
Modifier and Type | Class and Description |
---|---|
protected static class |
HttpTracker.TrackerRequestType |
Constructor and Description |
---|
HttpTracker(String trackerUrl,
TorrentRegistry torrentRegistry,
IdentityService idService,
IPeerRegistry peerRegistry,
EncryptionPolicy encryptionPolicy,
InetAddress localAddress,
int numberOfPeersToRequestFromTracker,
Duration timeout) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected TrackerQueryBuilder |
createTrackerQuery(HttpTracker.TrackerRequestType eventType,
TrackerRequestBuilder requestBuilder)
Build the query to send to the tracker.
|
TrackerRequestBuilder |
request(TorrentId torrentId)
Build a tracker request for a given torrent.
|
String |
toString() |
public HttpTracker(String trackerUrl, TorrentRegistry torrentRegistry, IdentityService idService, IPeerRegistry peerRegistry, EncryptionPolicy encryptionPolicy, InetAddress localAddress, int numberOfPeersToRequestFromTracker, Duration timeout)
trackerUrl
- Tracker URLidService
- Identity servicepublic TrackerRequestBuilder request(TorrentId torrentId)
Tracker
protected TrackerQueryBuilder createTrackerQuery(HttpTracker.TrackerRequestType eventType, TrackerRequestBuilder requestBuilder)
eventType
- The event type to announce to the trackerrequestBuilder
- the information to build the requestpublic void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2016–2021. All rights reserved.