Methods Summary |
---|
public RPReply | _process(RPRequest request)
String method = request.getMethod();
if ( method.equals( "download")){
try{
Torrent to = delegate.download();
RPTorrent res = RPTorrent.create( to );
return( new RPReply( res ));
}catch( TorrentException e ){
return(new RPReply(e));
}
}else if ( method.equals( "download[String]")){
try{
Torrent to = delegate.download((String)request.getParams()[0]);
RPTorrent res = RPTorrent.create( to );
return( new RPReply( res ));
}catch( TorrentException e ){
return(new RPReply(e));
}
}
throw( new RPException( "Unknown method: " + method ));
|
protected void | _setDelegate(java.lang.Object _delegate)
delegate = (TorrentDownloader)_delegate;
|
public java.lang.Object | _setLocal()
return( _fixupLocal());
|
public static org.gudy.azureus2.pluginsimpl.remote.torrent.RPTorrentDownloader | create(TorrentDownloader _delegate)
RPTorrentDownloader res =(RPTorrentDownloader)_lookupLocal( _delegate );
if ( res == null ){
res = new RPTorrentDownloader( _delegate );
}
return( res );
|
public Torrent | download()
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 );
}
|
public Torrent | download(java.lang.String encoding)
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 );
}
|