public interface BtClient
Modifier and Type | Method and Description |
---|---|
boolean |
isStarted()
Check if this client is started.
|
CompletableFuture<?> |
startAsync()
Start torrent processing asynchronously in a separate thread.
|
CompletableFuture<?> |
startAsync(Consumer<TorrentSessionState> listener,
long period)
Start torrent processing asynchronously in a separate thread
and schedule periodic callback invocations.
|
void |
stop()
Stop torrent processing.
|
boolean |
updateFilePriorities(FilePrioritySelector torrentFilePrioritySelector)
Update the priorities of the files to downloaded with the specified file priority selector.
|
CompletableFuture<?> startAsync()
CompletableFuture<?> startAsync(Consumer<TorrentSessionState> listener, long period)
listener
- Callback, that is periodically provided
with an up-to-date state of torrent session.period
- Interval at which the listener should be invoked, in milliseconds.void stop()
boolean isStarted()
boolean updateFilePriorities(FilePrioritySelector torrentFilePrioritySelector)
torrentFilePrioritySelector
- the selector for file priority selectionsCopyright © 2016–2021. All rights reserved.