public class ActiveProcess extends Object
Modifier and Type | Field and Description |
---|---|
protected InputStream |
is |
protected static org.apache.log4j.Logger |
log |
protected Process |
process |
protected Future |
readerFuture |
protected ExecutorService |
readService
|
Modifier | Constructor and Description |
---|---|
protected |
ActiveProcess() |
|
ActiveProcess(List<String> command,
AbstractProcessCollector collector) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAlive()
Return
true unless the process is known to be dead. |
void |
start(AbstractProcessReader processReader)
Attaches the reader to the process, which was started by the ctor and
is already running.
|
void |
stop()
Stops the process
|
protected static final org.apache.log4j.Logger log
protected final ExecutorService readService
protected Process process
protected InputStream is
protected volatile Future readerFuture
protected ActiveProcess()
public ActiveProcess(List<String> command, AbstractProcessCollector collector)
command
- The command to be executed. See
ProcessBuilder.command(List)
.collector
- public void start(AbstractProcessReader processReader)
processReader
- The reader.public void stop()
public boolean isAlive()
true
unless the process is known to be dead.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.