Class ProcessWrapperImpl
- java.lang.Object
-
- org.sonar.plugins.javascript.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 void
destroyForcibly(Process process)
int
exitValue(Process process)
String
getenv(String name)
void
interrupt()
boolean
isMac()
boolean
isWindows()
Process
startProcess(List<String> commandLine, Map<String,String> env, Consumer<String> outputConsumer, Consumer<String> errorConsumer)
boolean
waitFor(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:
startProcess
in interfaceProcessWrapper
- Throws:
IOException
-
waitFor
public boolean waitFor(Process process, long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
waitFor
in interfaceProcessWrapper
- Throws:
InterruptedException
-
interrupt
public void interrupt()
- Specified by:
interrupt
in interfaceProcessWrapper
-
destroyForcibly
public void destroyForcibly(Process process)
- Specified by:
destroyForcibly
in interfaceProcessWrapper
-
isMac
public boolean isMac()
- Specified by:
isMac
in interfaceProcessWrapper
-
isWindows
public boolean isWindows()
- Specified by:
isWindows
in interfaceProcessWrapper
-
getenv
@CheckForNull public String getenv(String name)
- Specified by:
getenv
in interfaceProcessWrapper
-
exitValue
public int exitValue(Process process)
- Specified by:
exitValue
in interfaceProcessWrapper
-
-