Package command.logic
Class CommandExecutor
java.lang.Object
command.logic.CommandExecutor
Class for executing commands. Provides different inputs for command executing.
-
Constructor Summary
ConstructorDescriptionCommandExecutor
(ArrayList<CommandDescription> commands, InputStream input, CommandMode mode, ApplicationResponseProvider<CommandStatusResponse>... providers) Constructor :/ -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeSingleCommand
(String line) void
Start executing commands from InputStream.
-
Constructor Details
-
CommandExecutor
@SafeVarargs public CommandExecutor(ArrayList<CommandDescription> commands, InputStream input, CommandMode mode, ApplicationResponseProvider<CommandStatusResponse>... providers) throws CommandsNotLoadedException Constructor :/- Parameters:
commands
- array of commandsinput
- commands stream (File, System.in, e.t.c.)mode
- variant of command behavior (see CommandMode enum)- Throws:
CommandsNotLoadedException
-
-
Method Details
-
startExecuting
public void startExecuting()Start executing commands from InputStream. -
executeSingleCommand
- Throws:
CommandInterruptedException
-