use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.
the class RPTorrentManager method getURLDownloader.
// ************************************************************************
@Override
public TorrentDownloader getURLDownloader(URL url) throws TorrentException {
try {
RPTorrentDownloader resp = (RPTorrentDownloader) _dispatcher.dispatch(new RPRequest(this, "getURLDownloader[URL]", new Object[] { url })).getResponse();
resp._setRemote(_dispatcher);
return (resp);
} catch (RPException e) {
if (e.getCause() instanceof TorrentException) {
throw ((TorrentException) e.getCause());
}
throw (e);
}
}
use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.
the class RPTracker method host.
// ************************************************************************
@Override
public TrackerTorrent host(Torrent torrent, boolean persistent) throws TrackerException {
try {
RPTrackerTorrent resp = (RPTrackerTorrent) _dispatcher.dispatch(new RPRequest(this, "host[Torrent,boolean]", new Object[] { torrent, Boolean.valueOf(persistent) })).getResponse();
resp._setRemote(_dispatcher);
return (resp);
} catch (RPException e) {
if (e.getCause() instanceof TrackerException) {
throw ((TrackerException) e.getCause());
}
throw (e);
}
}
use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.
the class RPDownloadManager method addDownload.
@Override
public Download addDownload(Torrent torrent, File torrent_location, File data_location) throws DownloadException {
try {
RPDownload res = (RPDownload) _dispatcher.dispatch(new RPRequest(this, "addDownload[Torrent,String,String]", new Object[] { torrent, torrent_location == null ? null : torrent_location.toString(), data_location == null ? null : data_location.toString() })).getResponse();
res._setRemote(_dispatcher);
return (res);
} catch (RPException e) {
if (e.getCause() instanceof DownloadException) {
throw ((DownloadException) e.getCause());
}
throw (e);
}
}
use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.
the class RPDownloadManager method addDownload.
@Override
public Download addDownload(Torrent torrent) throws DownloadException {
try {
RPDownload res = (RPDownload) _dispatcher.dispatch(new RPRequest(this, "addDownload[Torrent]", new Object[] { torrent })).getResponse();
res._setRemote(_dispatcher);
return (res);
} catch (RPException e) {
if (e.getCause() instanceof DownloadException) {
throw ((DownloadException) e.getCause());
}
throw (e);
}
}
Aggregations