reviewed dashboardapi

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@27894 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: 5a3cd10d789ec40761ca5650e971eb76502b57ea
This commit is contained in:
jiaz 2014-11-12 08:12:58 +00:00
parent 972a3207d2
commit 3436649e7d
2 changed files with 122 additions and 118 deletions

View File

@ -1,103 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="jd/plugins/optional/neembuu/|jd/plugins/optional/remoteserv/|jd/plugins/optional/remoteserv/|org/jdownloader/extensions/langfileeditor/" kind="src" path="src"/>
<classpathentry kind="src" path="src-closed"/>
<classpathentry kind="src" path="translations"/>
<classpathentry kind="src" path="themes"/>
<classpathentry excluding="org/jdownloader/nativeswing/OptionsAndPlaylistExample.java|org/jdownloader/nativeswing/SimpleVLCPlayerExample.java" kind="src" path="tests"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jd/ressourcen/libs/dbus"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/irclib.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/mail.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/debug-1.0.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/jcip-annotations-1.0.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/Filters.jar" sourcepath="ressourcen/code-ressourcen/Filter_src.zip"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/looks.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/synthetica.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/jd/ressourcen/code-ressourcen/synthetica_docs.zip!/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlackMoon.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlackStar.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueIce.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueMoon.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueSteel.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaMauveMetallic.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaOrangeMetallic.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaSilverMoon.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaSimple2D.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaSkyMetallic.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaWhiteVision.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/jna.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlackEye.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaGreenDream.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/image4j.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/debug-disable.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/hexdump.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/libdbus-java.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/unix.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-assert-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-assert-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-reflect-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-reflect-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-swing-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-swing-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-swing-junit-4.5-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-swing-junit-4.5-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-util-1.1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-util-1.1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/svnkit.jar" sourcepath="ressourcen/code-ressourcen/svnkitsrc.zip"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/junit-4.8.2.jar" sourcepath="ressourcen/code-ressourcen/junit-4.8.2-src.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbinding.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/jpathwatch-0-93-rc1.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/AppleJavaExtensions.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/asc.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/swfutils.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/JDBrowser"/>
<classpathentry combineaccessrules="false" kind="src" path="/AppWorkUtils"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbindingWin.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/mqtt.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/jackson-core.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/jackson-mapper.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/miglayout.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/bcprov-jdk15on-147.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbindingLinux.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbindingMac.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/MyJDownloaderClient"/>
<classpathentry kind="lib" path="ressourcen/libs/jna_platform.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/cling-core.jar" sourcepath="dev/cling-core-2.0-SNAPSHOT-sources.jar">
<attributes>
<attribute name="source_encoding" value="UTF-8"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/cling-support.jar">
<attributes>
<attribute name="source_encoding" value="UTF-8"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/seamless-http.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/seamless-util.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/seamless-xml.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/proxyVole.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/savemytube.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/htmlunit-core-js.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/js.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaAluOxide.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueLight.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaClassy.jar"/>
<classpathentry kind="var" path="SWT_PLATFORM" sourcepath="/JD_WORKSPACE/dev/libs/SWT/src.zip">
<attributes>
<attribute name="source_encoding" value="UTF-8"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/swt/DJNativeSwing-SWT.jar" sourcepath="dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.src.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/JDownloader/dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.docs.zip!/api"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/swt/DJNativeSwing.jar" sourcepath="dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.src.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/JDownloader/dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.docs.zip!/api/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="jd/plugins/optional/neembuu/|jd/plugins/optional/remoteserv/|jd/plugins/optional/remoteserv/|org/jdownloader/extensions/langfileeditor/" kind="src" path="src"/>
<classpathentry kind="src" path="src-closed"/>
<classpathentry kind="src" path="translations"/>
<classpathentry kind="src" path="themes"/>
<classpathentry excluding="org/jdownloader/nativeswing/OptionsAndPlaylistExample.java|org/jdownloader/nativeswing/SimpleVLCPlayerExample.java" kind="src" path="tests"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jd/ressourcen/libs/dbus"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/irclib.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/mail.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/debug-1.0.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/jcip-annotations-1.0.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/Filters.jar" sourcepath="ressourcen/code-ressourcen/Filter_src.zip"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/looks.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/synthetica.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/jd/ressourcen/code-ressourcen/synthetica_docs.zip!/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlackMoon.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlackStar.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueIce.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueMoon.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueSteel.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaMauveMetallic.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaOrangeMetallic.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaSilverMoon.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaSimple2D.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaSkyMetallic.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaWhiteVision.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/jna.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlackEye.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaGreenDream.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/image4j.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/debug-disable.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/hexdump.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/libdbus-java.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/dbus/unix.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-assert-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-assert-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-reflect-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-reflect-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-swing-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-swing-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-swing-junit-4.5-1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-swing-junit-4.5-1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/fest-util-1.1.2.jar" sourcepath="ressourcen/code-ressourcen/fest-util-1.1.2-sources.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/svnkit.jar" sourcepath="ressourcen/code-ressourcen/svnkitsrc.zip"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/junit-4.8.2.jar" sourcepath="ressourcen/code-ressourcen/junit-4.8.2-src.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbinding.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/jpathwatch-0-93-rc1.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/AppleJavaExtensions.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/asc.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/swfutils.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/JDBrowser"/>
<classpathentry combineaccessrules="false" kind="src" path="/AppWorkUtils"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbindingWin.jar"/>
<classpathentry kind="lib" path="ressourcen/libs_ext/mqtt.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/jackson-core.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/jackson-mapper.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/miglayout.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/bcprov-jdk15on-147.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbindingLinux.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/sevenzipjbindingMac.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/MyJDownloaderClient"/>
<classpathentry kind="lib" path="ressourcen/libs/jna_platform.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/cling-core.jar" sourcepath="dev/cling-core-2.0-SNAPSHOT-sources.jar">
<attributes>
<attribute name="source_encoding" value="UTF-8"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/cling-support.jar">
<attributes>
<attribute name="source_encoding" value="UTF-8"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/seamless-http.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/seamless-util.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/UPNP/seamless-xml.jar"/>
<classpathentry kind="lib" path="/AppWorkUtils/libs/proxyVole.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/savemytube.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/htmlunit-core-js.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/js.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaAluOxide.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaBlueLight.jar"/>
<classpathentry kind="lib" path="ressourcen/libs/laf/syntheticaClassy.jar"/>
<classpathentry kind="var" path="SWT_PLATFORM/swt.jar" sourcepath="/JD_WORKSPACE/dev/libs/SWT/src.zip">
<attributes>
<attribute name="source_encoding" value="UTF-8"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/swt/DJNativeSwing-SWT.jar" sourcepath="dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.src.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/JDownloader/dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.docs.zip!/api"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="ressourcen/libs/swt/DJNativeSwing.jar" sourcepath="dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.src.zip">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/JDownloader/dev/libs/DJNativeSwing-SWT-1-0-2/DJNativeSwing-SWT-1-0-2.docs.zip!/api/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -49,15 +49,19 @@ public class DashboardApi implements IDashboardApi {
timer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
_speedList.addLast(DownloadWatchDog.getInstance().getDownloadSpeedManager().getSpeed());
_speedList.removeFirst();
final int speed = DownloadWatchDog.getInstance().getDownloadSpeedManager().getSpeed();
synchronized (_speedList) {
_speedList.addLast(speed);
_speedList.removeFirst();
}
}
}, 3 * 1000, 3 * 1000);
}
public List<Integer> speedList() {
return new ArrayList<Integer>(_speedList);
synchronized (_speedList) {
return new ArrayList<Integer>(_speedList);
}
}
public String apiVersion() {
@ -66,7 +70,7 @@ public class DashboardApi implements IDashboardApi {
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#start()
*/
@Override
@ -77,7 +81,7 @@ public class DashboardApi implements IDashboardApi {
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#stop()
*/
@Override
@ -88,7 +92,7 @@ public class DashboardApi implements IDashboardApi {
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#pause(java.lang .Boolean)
*/
@Override
@ -102,7 +106,7 @@ public class DashboardApi implements IDashboardApi {
// running = 0
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#getState()
*/
@Override
@ -180,7 +184,7 @@ public class DashboardApi implements IDashboardApi {
// used in iPhone-App
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#speed()
*/
@Override
@ -192,7 +196,7 @@ public class DashboardApi implements IDashboardApi {
// used in iPhone-App
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#limit()
*/
@Override
@ -204,7 +208,7 @@ public class DashboardApi implements IDashboardApi {
// used in iPhone-App
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#traffic()
*/
@Override
@ -214,7 +218,7 @@ public class DashboardApi implements IDashboardApi {
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#setLimitspeed (int)
*/
@Override
@ -225,7 +229,7 @@ public class DashboardApi implements IDashboardApi {
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#activateLimitspeed (boolean)
*/
@Override
@ -239,7 +243,7 @@ public class DashboardApi implements IDashboardApi {
// used in iPhone-App
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#speedMeter(org .appwork.remoteapi.RemoteAPIRequest,
* org.appwork.remoteapi.RemoteAPIResponse)
*/
@ -277,7 +281,7 @@ public class DashboardApi implements IDashboardApi {
/*
* (non-Javadoc)
*
*
* @see org.jdownloader.extensions.jdanywhere.api.IDashboardApi#runningLinks()
*/
@Override