Package org.teamapps.media.exec
Class CommandLineExecutor
java.lang.Object
org.teamapps.media.exec.CommandLineExecutor
public class CommandLineExecutor
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description CommandLineExecutor(java.io.File workingDirectory, ExternalResource resource)CommandLineExecutor(java.lang.String binaryPath)CommandLineExecutor(ExternalResource resource) -
Method Summary
Modifier and Type Method Description java.io.FilecreateWorkingDir(java.io.File workingDirectory)booleanexecuteCommand(int maxRuntimeInSeconds, boolean showLogs, java.lang.String... commandArgs)booleanexecuteCommand(java.lang.String commandArgs, int maxRuntimeInSeconds, boolean showLogs)booleanexecuteCommand(java.lang.String commandArgs, int maxRuntimeInSeconds, java.lang.StringBuilder info, java.lang.StringBuilder error)java.util.concurrent.CompletableFuture<java.lang.Void>executeCommandAsync(java.lang.String commandArgs, int maxRuntimeInSeconds)java.util.concurrent.CompletableFuture<java.lang.Void>executeCommandAsync(java.lang.String commandArgs, int maxRuntimeInSeconds, java.util.concurrent.Executor executor)java.util.concurrent.CompletableFuture<java.io.File>executeCommandAsync(java.lang.String commandArgs, java.io.File expectedResultFile, boolean expectFileWithContent, int maxRuntimeInSeconds, java.util.concurrent.Executor executor)java.util.concurrent.CompletableFuture<java.io.File>executeCommandAsync(java.lang.String commandArgs, java.io.File path, java.lang.String partOfResultFileName, boolean expectFileWithContent, int maxRuntimeInSeconds, java.util.concurrent.Executor executor)java.lang.StringgetBinaryPath()java.lang.StringgetNextFileName(java.lang.String name, java.lang.String suffix)java.io.FilegetWorkingDirectory()java.lang.StringgetWorkingPath()voidshowLogs(java.io.InputStream is, boolean errorLog)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CommandLineExecutor
-
CommandLineExecutor
-
CommandLineExecutor
public CommandLineExecutor(java.lang.String binaryPath)
-
-
Method Details
-
executeCommand
public boolean executeCommand(java.lang.String commandArgs, int maxRuntimeInSeconds, boolean showLogs) -
executeCommand
public boolean executeCommand(int maxRuntimeInSeconds, boolean showLogs, java.lang.String... commandArgs) -
executeCommand
public boolean executeCommand(java.lang.String commandArgs, int maxRuntimeInSeconds, java.lang.StringBuilder info, java.lang.StringBuilder error) -
executeCommandAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> executeCommandAsync(java.lang.String commandArgs, int maxRuntimeInSeconds) -
executeCommandAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> executeCommandAsync(java.lang.String commandArgs, int maxRuntimeInSeconds, java.util.concurrent.Executor executor) -
executeCommandAsync
public java.util.concurrent.CompletableFuture<java.io.File> executeCommandAsync(java.lang.String commandArgs, java.io.File expectedResultFile, boolean expectFileWithContent, int maxRuntimeInSeconds, java.util.concurrent.Executor executor) -
executeCommandAsync
public java.util.concurrent.CompletableFuture<java.io.File> executeCommandAsync(java.lang.String commandArgs, java.io.File path, java.lang.String partOfResultFileName, boolean expectFileWithContent, int maxRuntimeInSeconds, java.util.concurrent.Executor executor) -
showLogs
public void showLogs(java.io.InputStream is, boolean errorLog) -
createWorkingDir
public java.io.File createWorkingDir(java.io.File workingDirectory) -
getWorkingDirectory
public java.io.File getWorkingDirectory() -
getWorkingPath
public java.lang.String getWorkingPath() -
getBinaryPath
public java.lang.String getBinaryPath() -
getNextFileName
public java.lang.String getNextFileName(java.lang.String name, java.lang.String suffix)
-