The goal if this project is to create an implementation of the file sharing API provided by the Eclipse Communication Framework using the BitTorrent protocol. The BitTorrent protocol will be implemented in 100% Java in a clean room environment. It is currently under active development and is licensed under both the MIT License and the Eclipse Public License.

Getting the code

The 'Summer of Code' project component has been approved by Eclipse but the code has not yet been committed into CVS yet as it is currently questionable whether the base library itself will be hosted by Eclipse.org or not.

Features

start and stop torrents, resuming supported

select which files to try to download first and which files to not download at all

set up and down speeds

BitTorrent plug-in data model

The package name org.eclipse.bittorrent may be altered when the plug-in is released. All internal packages are not intended to be used by developers and the implementation will change even after the API has reached a 1.0 release.

Text in red denotes that the code for that specified class or interface has not been written yet.

org.eclipse.bittorrent

Torrent- reads in a TorrentFile and connects to peers to begin seeding or downloading

TorrentFile - a representation of the metainfo stored within a .torrent file

It is also assumed that a path has been set for the library to save configuration and state information to properly support the resuming of torrents without having to perform a hash check when the client has started.

Use Case 2.1 - resume downloading a torrent after pausing it for a period of time

Torrent torrent = new Torrent(new File("eclipse-sdk.torrent"));
torrent.addTorrentStateListener(stateListener);
torrent.start(stateListener);
// after some amount of time has passed
torrent.stop();
// more time passes
torrent.start();

Use Case 3 - begin downloading from two different torrents until completion

Use Case 6 - start downloading multiple files from a torrent and select which files should be downloaded

Torrent torrent = TorrentFactory.createTorrent(new TorrentFile(new File("eclipse-all-in-one.torrent")));
// assuming that this torrent has three files and the user only wants the first one
torrent.setFilesToDownload(new int[] { 0, -1, -1 });
torrent.start();

Use Case 7 - begin downloading a file from a torrent and cap the download/upload speeds