Package dev.enola.common.exec
Class MockProcessLauncher
java.lang.Object
dev.enola.common.exec.MockProcessLauncher
- All Implemented Interfaces:
ProcessLauncher
-
Constructor Summary
ConstructorsConstructorDescriptionMockProcessLauncher(int exit, byte[] out, byte[] err) MockProcessLauncher(Throwable e, byte[] out, byte[] err) -
Method Summary
Modifier and TypeMethodDescriptioncommand()env()execute(ProcessRequest request) Launch a new process (and immediately return).
-
Constructor Details
-
MockProcessLauncher
-
MockProcessLauncher
-
-
Method Details
-
execute
Description copied from interface:ProcessLauncherLaunch a new process (and immediately return).Note that this intentionally does NOT throw IOException. Any start errors, such as a failure to launch e.g. due to an image file not found or not executable, as well as implementation-specific conditions encountered later (such as perhaps an "unexpected return code") are always only reported via
ProcessResponse.async().- Specified by:
executein interfaceProcessLauncher- Parameters:
request- theProcessRequest- Returns:
- the
ProcessResponse
-
directory
-
command
-
env
-