Search in sources :

Example 1 with RPRequest

use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.

the class RPTorrentDownloader method download.

@Override
public Torrent download(String encoding) throws TorrentException {
    try {
        RPTorrent resp = (RPTorrent) _dispatcher.dispatch(new RPRequest(this, "download[String]", new Object[] { encoding })).getResponse();
        resp._setRemote(_dispatcher);
        return (resp);
    } catch (RPException e) {
        if (e.getCause() instanceof TorrentException) {
            throw ((TorrentException) e.getCause());
        }
        throw (e);
    }
}
Also used : RPRequest(com.biglybt.pifimpl.remote.RPRequest) RPException(com.biglybt.pifimpl.remote.RPException) RPObject(com.biglybt.pifimpl.remote.RPObject) TorrentException(com.biglybt.pif.torrent.TorrentException)

Example 2 with RPRequest

use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.

the class RPTorrentManager method getURLDownloader.

@Override
public TorrentDownloader getURLDownloader(URL url, String user_name, String password) throws TorrentException {
    try {
        RPTorrentDownloader resp = (RPTorrentDownloader) _dispatcher.dispatch(new RPRequest(this, "getURLDownloader[URL,String,String]", new Object[] { url, user_name, password })).getResponse();
        resp._setRemote(_dispatcher);
        return (resp);
    } catch (RPException e) {
        if (e.getCause() instanceof TorrentException) {
            throw ((TorrentException) e.getCause());
        }
        throw (e);
    }
}
Also used : RPRequest(com.biglybt.pifimpl.remote.RPRequest) RPException(com.biglybt.pifimpl.remote.RPException) RPObject(com.biglybt.pifimpl.remote.RPObject)

Example 3 with RPRequest

use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.

the class RPTorrentManager method createFromBEncodedData.

@Override
public Torrent createFromBEncodedData(byte[] data) throws TorrentException {
    try {
        RPTorrent res = (RPTorrent) _dispatcher.dispatch(new RPRequest(this, "createFromBEncodedData[byte[]]", new Object[] { data })).getResponse();
        res._setRemote(_dispatcher);
        return (res);
    } catch (RPException e) {
        if (e.getCause() instanceof TorrentException) {
            throw ((TorrentException) e.getCause());
        }
        throw (e);
    }
}
Also used : RPRequest(com.biglybt.pifimpl.remote.RPRequest) RPException(com.biglybt.pifimpl.remote.RPException) RPObject(com.biglybt.pifimpl.remote.RPObject)

Example 4 with RPRequest

use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.

the class RPIPFilter method createAndAddRange.

@Override
public IPRange createAndAddRange(String description, String start_ip, String end_ip, boolean this_session_only) {
    RPIPRange resp = (RPIPRange) _dispatcher.dispatch(new RPRequest(this, "createAndAddRange[String,String,String,boolean]", new Object[] { description, start_ip, end_ip, Boolean.valueOf(this_session_only) })).getResponse();
    resp._setRemote(_dispatcher);
    return (resp);
}
Also used : RPRequest(com.biglybt.pifimpl.remote.RPRequest) RPObject(com.biglybt.pifimpl.remote.RPObject)

Example 5 with RPRequest

use of com.biglybt.pifimpl.remote.RPRequest in project BiglyBT by BiglySoftware.

the class RPTorrentDownloader method download.

// ************************************************************************
@Override
public Torrent download() throws TorrentException {
    try {
        RPTorrent resp = (RPTorrent) _dispatcher.dispatch(new RPRequest(this, "download", null)).getResponse();
        resp._setRemote(_dispatcher);
        return (resp);
    } catch (RPException e) {
        if (e.getCause() instanceof TorrentException) {
            throw ((TorrentException) e.getCause());
        }
        throw (e);
    }
}
Also used : RPRequest(com.biglybt.pifimpl.remote.RPRequest) RPException(com.biglybt.pifimpl.remote.RPException) TorrentException(com.biglybt.pif.torrent.TorrentException)

Aggregations

RPRequest (com.biglybt.pifimpl.remote.RPRequest)9 RPException (com.biglybt.pifimpl.remote.RPException)8 RPObject (com.biglybt.pifimpl.remote.RPObject)8 TorrentException (com.biglybt.pif.torrent.TorrentException)2 TrackerException (com.biglybt.pif.tracker.TrackerException)1