📄 rpdownloadmanager.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: RPDownloadManager.java
package org.gudy.azureus2.pluginsimpl.remote.download;
import java.io.File;
import java.net.URL;
import java.util.Map;
import org.gudy.azureus2.plugins.download.*;
import org.gudy.azureus2.plugins.download.savelocation.DefaultSaveLocationManager;
import org.gudy.azureus2.plugins.download.savelocation.SaveLocationManager;
import org.gudy.azureus2.plugins.torrent.Torrent;
import org.gudy.azureus2.pluginsimpl.remote.*;
import org.gudy.azureus2.pluginsimpl.remote.torrent.RPTorrent;
// Referenced classes of package org.gudy.azureus2.pluginsimpl.remote.download:
// RPDownload
public class RPDownloadManager extends RPObject
implements DownloadManager
{
protected transient DownloadManager delegate;
public static RPDownloadManager create(DownloadManager _delegate)
{
RPDownloadManager res = (RPDownloadManager)_lookupLocal(_delegate);
if (res == null)
res = new RPDownloadManager(_delegate);
return res;
}
protected RPDownloadManager(DownloadManager _delegate)
{
super(_delegate);
}
protected void _setDelegate(Object _delegate)
{
delegate = (DownloadManager)_delegate;
}
public Object _setLocal()
throws RPException
{
return _fixupLocal();
}
public RPReply _process(RPRequest request)
{
String method;
Object params[];
method = request.getMethod();
params = request.getParams();
if (method.equals("getDownloads"))
{
Download downloads[] = delegate.getDownloads();
RPDownload res[] = new RPDownload[downloads.length];
for (int i = 0; i < res.length; i++)
res[i] = RPDownload.create(downloads[i]);
return new RPReply(res);
}
if (method.equals("getDownloads[boolean]"))
{
Download downloads[] = delegate.getDownloads(((Boolean)request.getParams()[0]).booleanValue());
RPDownload res[] = new RPDownload[downloads.length];
for (int i = 0; i < res.length; i++)
res[i] = RPDownload.create(downloads[i]);
return new RPReply(res);
}
if (!method.equals("addDownload[Torrent]"))
break MISSING_BLOCK_LABEL_224;
Download res;
RPTorrent torrent = (RPTorrent)request.getParams()[0];
res = delegate.addDownload((Torrent)torrent._setLocal());
return new RPReply(RPDownload.create(res));
DownloadException e;
e;
throw new RPException("DownloadManager::addDownload failed", e);
if (!method.equals("addDownload[Torrent,String,String]"))
break MISSING_BLOCK_LABEL_344;
Download res;
RPTorrent torrent = (RPTorrent)request.getParams()[0];
File f1 = params[1] != null ? new File((String)params[1]) : null;
File f2 = params[2] != null ? new File((String)params[2]) : null;
res = delegate.addDownload((Torrent)torrent._setLocal(), f1, f2);
return new RPReply(RPDownload.create(res));
torrent;
throw new RPException("DownloadManager::addDownload failed", torrent);
if (method.equals("addDownload[URL]"))
{
try
{
delegate.addDownload((URL)request.getParams()[0]);
}
// Misplaced declaration of an exception variable
catch (RPTorrent torrent)
{
throw new RPException("DownloadManager::addDownload failed", torrent);
}
return new RPReply(null);
}
if (method.equals("pauseDownloads"))
{
delegate.pauseDownloads();
return null;
}
if (method.equals("resumeDownloads"))
{
delegate.resumeDownloads();
return null;
}
if (method.equals("stopAllDownloads"))
{
delegate.stopAllDownloads();
return null;
}
if (method.equals("startAllDownloads"))
{
delegate.startAllDownloads();
return null;
} else
{
throw new RPException((new StringBuilder()).append("Unknown method: ").append(method).toString());
}
}
public void addDownload(File torrent_file)
throws DownloadException
{
notSupported();
}
public void addDownload(URL url, URL referer)
{
notSupported();
}
public void addDownload(URL url)
throws DownloadException
{
_dispatcher.dispatch(new RPRequest(this, "addDownload[URL]", new Object[] {
url
})).getResponse();
}
public void addDownload(URL url, boolean auto_download)
throws DownloadException
{
notSupported();
}
public void addDownload(URL url, Map request_properties)
{
notSupported();
}
public Download addDownload(Torrent torrent)
throws DownloadException
{
RPDownload res;
res = (RPDownload)_dispatcher.dispatch(new RPRequest(this, "addDownload[Torrent]", new Object[] {
torrent
})).getResponse();
res._setRemote(_dispatcher);
return res;
RPException e;
e;
if (e.getCause() instanceof DownloadException)
throw (DownloadException)e.getCause();
else
throw e;
}
public Download addDownload(Torrent torrent, File torrent_location, File data_location)
throws DownloadException
{
RPDownload res;
res = (RPDownload)_dispatcher.dispatch(new RPRequest(this, "addDownload[Torrent,String,String]", new Object[] {
torrent, torrent_location != null ? torrent_location.toString() : null, data_location != null ? data_location.toString() : null
})).getResponse();
res._setRemote(_dispatcher);
return res;
RPException e;
e;
if (e.getCause() instanceof DownloadException)
throw (DownloadException)e.getCause();
else
throw e;
}
public Download addDownloadStopped(Torrent torrent, File torrent_location, File data_location)
throws DownloadException
{
notSupported();
return null;
}
public Download addNonPersistentDownload(Torrent torrent, File torrent_location, File data_location)
throws DownloadException
{
notSupported();
return null;
}
public Download getDownload(Torrent torrent)
{
notSupported();
return null;
}
public Download getDownload(byte hash[])
{
notSupported();
return null;
}
public Download[] getDownloads()
{
RPDownload res[] = (RPDownload[])(RPDownload[])_dispatcher.dispatch(new RPRequest(this, "getDownloads", null)).getResponse();
for (int i = 0; i < res.length; i++)
res[i]._setRemote(_dispatcher);
return res;
}
public Download[] getDownloads(boolean bSort)
{
RPDownload res[] = (RPDownload[])(RPDownload[])_dispatcher.dispatch(new RPRequest(this, "getDownloads[boolean]", new Object[] {
new Boolean(bSort)
})).getResponse();
for (int i = 0; i < res.length; i++)
res[i]._setRemote(_dispatcher);
return res;
}
public void pauseDownloads()
{
_dispatcher.dispatch(new RPRequest(this, "pauseDownloads", null)).getResponse();
}
public boolean canPauseDownloads()
{
notSupported();
return false;
}
public void resumeDownloads()
{
_dispatcher.dispatch(new RPRequest(this, "resumeDownloads", null)).getResponse();
}
public boolean canResumeDownloads()
{
notSupported();
return false;
}
public void startAllDownloads()
{
_dispatcher.dispatch(new RPRequest(this, "startAllDownloads", null)).getResponse();
}
public void stopAllDownloads()
{
_dispatcher.dispatch(new RPRequest(this, "stopAllDownloads", null)).getResponse();
}
public DownloadManagerStats getStats()
{
notSupported();
return null;
}
public boolean isSeedingOnly()
{
notSupported();
return false;
}
public void addListener(DownloadManagerListener l)
{
notSupported();
}
public void addListener(DownloadManagerListener l, boolean notify)
{
notSupported();
}
public void removeListener(DownloadManagerListener l)
{
notSupported();
}
public void removeListener(DownloadManagerListener l, boolean notify)
{
notSupported();
}
public void addDownloadWillBeAddedListener(DownloadWillBeAddedListener listener)
{
notSupported();
}
public void removeDownloadWillBeAddedListener(DownloadWillBeAddedListener listener)
{
notSupported();
}
public DownloadEventNotifier getGlobalDownloadEventNotifier()
{
notSupported();
return null;
}
public void setSaveLocationManager(SaveLocationManager manager)
{
notSupported();
}
public SaveLocationManager getSaveLocationManager()
{
notSupported();
return null;
}
public DefaultSaveLocationManager getDefaultSaveLocationManager()
{
notSupported();
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -