Comment Comment by train_robber In the older syntax, something like this: client.startAsync(new Consumer<TorrentSessionState> { void accept(TorrentSessionState state) { if (state.getPiecesRemaining() == 0) { client.stop(); } } }, 1000).join(); parent train_robber 9 years ago