Package me.lucko.scriptcontroller
Interface ScriptController
-
- All Known Implementing Classes:
ScriptControllerImpl
public interface ScriptControllerControls the execution and management ofScriptEnvironments.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceScriptController.BuilderBuilds aScriptController
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ScriptController.Builderbuilder()Creates a newScriptController.Builderusing the internal implementation.Collection<ScriptEnvironment>getEnvironments()Gets theScriptEnvironments being processed by the controllerdefault ScriptEnvironmentsetupNewEnvironment(Path loadDirectory)Sets up a newScriptEnvironmentin the given load directory.ScriptEnvironmentsetupNewEnvironment(Path loadDirectory, EnvironmentSettings settings)Sets up a newScriptEnvironmentin the given load directory.voidshutdown()Shuts down this script controller
-
-
-
Method Detail
-
builder
static ScriptController.Builder builder()
Creates a newScriptController.Builderusing the internal implementation.- Returns:
- the builder
-
getEnvironments
Collection<ScriptEnvironment> getEnvironments()
Gets theScriptEnvironments being processed by the controller- Returns:
- the environments
-
setupNewEnvironment
ScriptEnvironment setupNewEnvironment(Path loadDirectory, EnvironmentSettings settings)
Sets up a newScriptEnvironmentin the given load directory.- Parameters:
loadDirectory- the directorysettings- the environment settings- Returns:
- the new environment
- Throws:
UnsupportedOperationException- if the controller does not support setting up new environments after construction
-
setupNewEnvironment
default ScriptEnvironment setupNewEnvironment(Path loadDirectory)
Sets up a newScriptEnvironmentin the given load directory.- Parameters:
loadDirectory- the directory- Returns:
- the new environment
- Throws:
UnsupportedOperationException- if the controller does not support setting up new environments after construction
-
shutdown
void shutdown()
Shuts down this script controller
-
-