this.listener = listener;
}
+ @Override
+ public final T call() throws Exception {
+ try {
+ final T result = doInBackground();
+ // TODO
+ publish(null);
+ return result;
+ } catch (Throwable th) {
+ // TODO
+ publish(null);
+ throw th;
+ }
+ }
+
+ protected abstract T doInBackground() throws Exception;
+
public final int getId() {
return id;
}
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.swing.SwingWorker;
import saccubus.conv.ConvertToVideoHook;
import saccubus.worker.Worker;
import saccubus.worker.WorkerListener;
}
@Override
- public ConvertResult call() throws Exception {
+ protected ConvertResult doInBackground() throws Exception {
if (!profile.isConvert()) {
return new ConvertResult(true, "");
}
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
-import java.util.concurrent.Callable;
import java.util.logging.Logger;
-import javax.swing.SwingWorker;
import nicobrowser.GetFlvResult;
import nicobrowser.NamePattern;
import nicobrowser.NicoHttpClient;
import saccubus.worker.WorkerListener;
import saccubus.worker.profile.CommentProfile;
import saccubus.worker.profile.GeneralProfile;
-import saccubus.worker.profile.OutputProfile;
import saccubus.worker.profile.DownloadProfile;
import saccubus.worker.profile.ProxyProfile;
// }
// }
@Override
- public DownloadResult call() throws Exception {
+ public DownloadResult doInBackground() throws Exception {
publish(new DownloadProgress("ログイン中"));