2018-09-17 10:07:32 +03:00
|
|
|
package ru.gravit.launcher.server;
|
|
|
|
|
2019-01-12 03:13:24 +03:00
|
|
|
import ru.gravit.launcher.managers.ModulesConfigManager;
|
|
|
|
import ru.gravit.launcher.managers.SimpleModuleManager;
|
2018-12-20 18:45:01 +03:00
|
|
|
import ru.gravit.utils.PublicURLClassLoader;
|
|
|
|
|
2018-09-17 10:07:32 +03:00
|
|
|
import java.net.URL;
|
2019-01-12 03:13:24 +03:00
|
|
|
import java.nio.file.Paths;
|
2018-09-17 10:07:32 +03:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2018-09-17 13:14:59 +03:00
|
|
|
public class ModulesManager extends SimpleModuleManager {
|
2019-01-12 03:13:24 +03:00
|
|
|
public ModulesConfigManager modulesConfigManager;
|
2018-09-17 10:07:32 +03:00
|
|
|
public ModulesManager(ServerWrapper wrapper) {
|
|
|
|
modules = new ArrayList<>();
|
2019-01-12 03:13:24 +03:00
|
|
|
modulesConfigManager = new ModulesConfigManager(Paths.get("modules-config"));
|
2018-09-22 17:22:39 +03:00
|
|
|
classloader = new PublicURLClassLoader(new URL[0], ClassLoader.getSystemClassLoader());
|
2019-01-12 03:13:24 +03:00
|
|
|
context = new ServerModuleContext(wrapper, classloader, modulesConfigManager);
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
}
|