OSDN Git Service

Manager導入
[coroid/inqubus.git] / frontend / src / saccubus / worker / Download.java
index c10d0a3..c1fa449 100644 (file)
@@ -31,7 +31,7 @@ import saccubus.worker.profile.ProxyProfile;
  * @author 未入力
  * @version 1.0
  */
-public class Download extends SwingWorker<DownloadResult, DownloadProgress> implements Callable<Boolean> {
+public class Download extends SaccubusCallable<DownloadResult, DownloadProgress>  {
 
     private static final Logger logger = Logger.getLogger(Download.class.getName());
     private final DownloadProfile profile;
@@ -46,20 +46,22 @@ public class Download extends SwingWorker<DownloadResult, DownloadProgress> impl
      * @param flag
      */
     public Download(DownloadProfile profile, String videoId) {
+        // TODO listener登録
+        super(null);
         this.videoId = videoId;
         this.profile = profile;
     }
 
-    @Override
-    public Boolean call() throws Exception {
-        try {
-            final DownloadResult result = doInBackground();
-            return Boolean.valueOf(result.getResultValue());
-        } finally {
-            // TODO 何か処理が必要?
-//            getStopFlag().finished();
-        }
-    }
+//    @Override
+//    public Boolean call() throws Exception {
+//        try {
+//            final DownloadResult result = doInBackground();
+//            return Boolean.valueOf(result.getResultValue());
+//        } finally {
+//            // TODO 何か処理が必要?
+////            getStopFlag().finished();
+//        }
+//    }
 
 //    // TODO Runnableを実装しなくなったので削除する
 //    public void run() {
@@ -72,7 +74,7 @@ public class Download extends SwingWorker<DownloadResult, DownloadProgress> impl
 //        }
 //    }
     @Override
-    protected DownloadResult doInBackground() throws Exception {
+    public DownloadResult call() throws Exception {
 
         publish(new DownloadProgress("ログイン中"));