java.lang.RunnableAbstractProcessReaderpublic abstract class AbstractProcessRunnable
extends java.lang.Object
implements java.lang.Runnable
Process object.| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.Process |
m_Process |
the process to read from.
|
protected java.util.concurrent.BlockingQueue<java.lang.Process> |
m_Queue |
the blocking queue for the process.
|
protected boolean |
m_Stopped |
whether the reader got stopped.
|
| Constructor | Description |
|---|---|
AbstractProcessRunnable() |
Initializes the reader.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract void |
doRun() |
The actual processing loop.
|
java.lang.Process |
getProcess() |
Returns the underlying
Process object. |
boolean |
isStopped() |
Returns whether execution got stopped.
|
protected void |
logError(java.lang.String msg) |
Just outputs the message on stderr.
|
protected void |
logError(java.lang.String msg,
java.lang.Throwable t) |
Just outputs message and throwable on stderr.
|
void |
run() |
Reads the data from the process.
|
void |
setProcess(java.lang.Process value) |
Sets the process to monitor.
|
void |
stopExecution() |
Stops the execution.
|
protected java.util.concurrent.BlockingQueue<java.lang.Process> m_Queue
protected java.lang.Process m_Process
protected boolean m_Stopped
public void stopExecution()
public boolean isStopped()
public void setProcess(java.lang.Process value)
value - the process objectpublic java.lang.Process getProcess()
Process object.protected void logError(java.lang.String msg)
msg - the message to outputprotected void logError(java.lang.String msg,
java.lang.Throwable t)
msg - the message to outputt - the exceptionprotected abstract void doRun()
public void run()
run in interface java.lang.RunnableCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.