Implemented Task Manager API

This commit is contained in:
Konloch 2024-09-29 20:56:08 -06:00
parent a0adb9bb44
commit d343bce350

AI 샘플 코드 생성 중입니다

Loading...
2 changed files with 26 additions and 0 deletions

View File

@ -20,6 +20,7 @@ package the.bytecode.club.bytecodeviewer;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.konloch.taskmanager.TaskManager;
import me.konloch.kontainer.io.DiskReader;
import org.apache.commons.io.FileUtils;
import org.objectweb.asm.tree.ClassNode;
@ -150,6 +151,7 @@ public class BytecodeViewer
private static final Thread PING_BACK = new Thread(new PingBack(), "Pingback");
private static final Thread INSTALL_FAT_JAR = new Thread(new InstallFatJar(), "Install Fat-Jar");
private static final Thread BOOT_CHECK = new Thread(new BootCheck(), "Boot Check");
private static final TaskManager TASK_MANAGER = new TaskManager();
/**
* Main startup
@ -257,6 +259,9 @@ public class BytecodeViewer
cleanup();
}, "Shutdown Hook"));
//start the background task manager
TASK_MANAGER.start();
//setup the viewer
viewer.calledAfterLoad();
@ -580,6 +585,16 @@ public class BytecodeViewer
Settings.addRecentPlugin(file);
}
/**
* Returns the Task Manager
*
* @return the global task manager object
*/
public static TaskManager getTaskManager()
{
return TASK_MANAGER;
}
/**
* Send a message to alert the user
*

View File

@ -18,6 +18,7 @@
package the.bytecode.club.bytecodeviewer.api;
import com.konloch.taskmanager.TaskManager;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
@ -164,6 +165,16 @@ public class BCV
loader = new ClassNodeLoader();
}
/**
* Returns the background Task Manager
*
* @return the global BCV background task manager
*/
public static TaskManager getTaskManager()
{
return BytecodeViewer.getTaskManager();
}
/**
* Used to start a plugin from file.
*