mirror of
https://github.com/LamGC/Oracle-Sentry.git
synced 2025-04-29 22:27:34 +00:00
refactor: 调整类名, 以更符合其意义.
更改类名和相关属性名.
This commit is contained in:
parent
c47ab110bc
commit
bf29faa9a5
@ -6,7 +6,7 @@ import net.lamgc.oracle.sentry.script.tools.http.ScriptHttpClient;
|
||||
/**
|
||||
* @author LamGC
|
||||
*/
|
||||
public final record ScriptComponent(
|
||||
public final record ScriptComponents(
|
||||
ScriptHttpClient HTTP,
|
||||
ComputeInstanceManager InstanceManager
|
||||
) {
|
@ -19,13 +19,13 @@ public final class ScriptManager {
|
||||
|
||||
private final Set<ScriptLoader> loaders = new HashSet<>();
|
||||
private final File scriptsLocation;
|
||||
private final ScriptComponent context;
|
||||
private final ScriptComponents context;
|
||||
|
||||
private final Map<ScriptInfo, Script> scripts = new ConcurrentHashMap<>();
|
||||
|
||||
public ScriptManager(File scriptsLocation, ScriptComponent context) {
|
||||
public ScriptManager(File scriptsLocation, ScriptComponents components) {
|
||||
this.scriptsLocation = scriptsLocation;
|
||||
this.context = context;
|
||||
this.context = components;
|
||||
loadScriptLoaders();
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ class ScriptManagerTest {
|
||||
@Test
|
||||
public void loadScriptTest() {
|
||||
ScriptManager manager = new ScriptManager(new File("./run/scripts"),
|
||||
new ScriptComponent(new ScriptHttpClient(HttpClientBuilder.create().build()),
|
||||
new ScriptComponents(new ScriptHttpClient(HttpClientBuilder.create().build()),
|
||||
new ComputeInstanceManager()));
|
||||
|
||||
manager.loadScripts();
|
||||
|
Loading…
Reference in New Issue
Block a user