Commit d343bce 1 parent a0adb9b commit d343bce Copy full SHA for d343bce
File tree 2 files changed +26
-0
lines changed
src/main/java/the/bytecode/club/bytecodeviewer
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import com .google .gson .Gson ;
22
22
import com .google .gson .GsonBuilder ;
23
+ import com .konloch .taskmanager .TaskManager ;
23
24
import me .konloch .kontainer .io .DiskReader ;
24
25
import org .apache .commons .io .FileUtils ;
25
26
import org .objectweb .asm .tree .ClassNode ;
@@ -150,6 +151,7 @@ public class BytecodeViewer
150
151
private static final Thread PING_BACK = new Thread (new PingBack (), "Pingback" );
151
152
private static final Thread INSTALL_FAT_JAR = new Thread (new InstallFatJar (), "Install Fat-Jar" );
152
153
private static final Thread BOOT_CHECK = new Thread (new BootCheck (), "Boot Check" );
154
+ private static final TaskManager TASK_MANAGER = new TaskManager ();
153
155
154
156
/**
155
157
* Main startup
@@ -257,6 +259,9 @@ public static void boot(boolean cli)
257
259
cleanup ();
258
260
}, "Shutdown Hook" ));
259
261
262
+ //start the background task manager
263
+ TASK_MANAGER .start ();
264
+
260
265
//setup the viewer
261
266
viewer .calledAfterLoad ();
262
267
@@ -580,6 +585,16 @@ public static void startPlugin(File file)
580
585
Settings .addRecentPlugin (file );
581
586
}
582
587
588
+ /**
589
+ * Returns the Task Manager
590
+ *
591
+ * @return the global task manager object
592
+ */
593
+ public static TaskManager getTaskManager ()
594
+ {
595
+ return TASK_MANAGER ;
596
+ }
597
+
583
598
/**
584
599
* Send a message to alert the user
585
600
*
Original file line number Diff line number Diff line change 18
18
19
19
package the .bytecode .club .bytecodeviewer .api ;
20
20
21
+ import com .konloch .taskmanager .TaskManager ;
21
22
import org .objectweb .asm .ClassWriter ;
22
23
import org .objectweb .asm .tree .ClassNode ;
23
24
import the .bytecode .club .bytecodeviewer .BytecodeViewer ;
@@ -164,6 +165,16 @@ public static void createNewClassNodeLoaderInstance()
164
165
loader = new ClassNodeLoader ();
165
166
}
166
167
168
+ /**
169
+ * Returns the background Task Manager
170
+ *
171
+ * @return the global BCV background task manager
172
+ */
173
+ public static TaskManager getTaskManager ()
174
+ {
175
+ return BytecodeViewer .getTaskManager ();
176
+ }
177
+
167
178
/**
168
179
* Used to start a plugin from file.
169
180
*
You can’t perform that action at this time.
0 commit comments