Package org.sonarsource.nodejs
Class ProcessWrapperImpl
- java.lang.Object
-
- org.sonarsource.nodejs.ProcessWrapperImpl
-
- All Implemented Interfaces:
ProcessWrapper
public class ProcessWrapperImpl extends Object implements ProcessWrapper
-
-
Constructor Summary
Constructors Constructor Description ProcessWrapperImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroyForcibly(Process process)intexitValue(Process process)Stringgetenv(String name)voidinterrupt()booleanisMac()booleanisWindows()ProcessstartProcess(List<String> commandLine, Map<String,String> env, Consumer<String> outputConsumer, Consumer<String> errorConsumer)booleanwaitFor(Process process, long timeout, TimeUnit unit)
-
-
-
Method Detail
-
startProcess
public Process startProcess(List<String> commandLine, Map<String,String> env, Consumer<String> outputConsumer, Consumer<String> errorConsumer) throws IOException
- Specified by:
startProcessin interfaceProcessWrapper- Throws:
IOException
-
waitFor
public boolean waitFor(Process process, long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
waitForin interfaceProcessWrapper- Throws:
InterruptedException
-
interrupt
public void interrupt()
- Specified by:
interruptin interfaceProcessWrapper
-
destroyForcibly
public void destroyForcibly(Process process)
- Specified by:
destroyForciblyin interfaceProcessWrapper
-
isMac
public boolean isMac()
- Specified by:
isMacin interfaceProcessWrapper
-
isWindows
public boolean isWindows()
- Specified by:
isWindowsin interfaceProcessWrapper
-
getenv
@CheckForNull public String getenv(String name)
- Specified by:
getenvin interfaceProcessWrapper
-
exitValue
public int exitValue(Process process)
- Specified by:
exitValuein interfaceProcessWrapper
-
-