| Package | Description |
|---|---|
| berlin.yuna.clu.logic |
| Modifier and Type | Method and Description |
|---|---|
Terminal |
Terminal.breakOnError(boolean breakOnError)
Will throw
IllegalStateException on error when true |
Terminal |
Terminal.clearConsole()
Clears the console output
consoleInfo() consoleError() |
Terminal |
Terminal.consumerError(Consumer<String>... consumerError) |
Terminal |
Terminal.consumerErrorStream(Consumer<String>... consumerError) |
Terminal |
Terminal.consumerInfo(Consumer<String>... consumerError) |
Terminal |
Terminal.consumerInfoStream(Consumer<String>... consumerInfo) |
static Terminal |
Terminal.copyOf(Terminal terminal)
Clean copy of terminal with default consumer and clean console log
|
Terminal |
Terminal.dir(File dir) |
Terminal |
Terminal.dir(Path dir) |
Terminal |
Terminal.dir(String dir) |
Terminal |
Terminal.execute(String command)
Executes a command with (sh or cmd.exe) ant he help of the
ProcessBuilder
Default working directory: user.dir
timeoutMs(long) if timeout is needed |
Terminal |
Terminal.execute(String command,
long waitForMs)
Executes a command with (sh or cmd.exe) ant he help of the
ProcessBuilder
Default working directory: user.dir
timeoutMs(long) if timeout is needed |
Terminal |
Terminal.timeoutMs(long timeoutMs)
Alternative to
Process.waitFor() as sometimes a process can be to fast or to slow for Process.waitFor() or you need a timeout
Its combined with (breakOnError(boolean))
Default : -1 (deactivated)
Also activates a heartbeat check (timeoutMs / 40) which will also timeout if there is no output is happening |
Terminal |
Terminal.waitFor(long waitForMs) |
| Modifier and Type | Method and Description |
|---|---|
static Terminal |
Terminal.copyOf(Terminal terminal)
Clean copy of terminal with default consumer and clean console log
|
Copyright © 2022. All rights reserved.