public class RunnableNode extends java.lang.Object implements NativeNodeContainer
Modifier and Type | Field and Description |
---|---|
protected int |
autokillerSleepTime |
protected java.lang.String[] |
comm |
protected java.lang.String |
me |
protected java.lang.String |
name |
protected java.lang.Process |
p |
protected java.lang.ProcessBuilder |
prb |
protected boolean |
running |
Constructor and Description |
---|
RunnableNode(java.util.List<java.lang.String> command,
java.lang.String nodeName)
Prepare external runnable node to start.
|
RunnableNode(java.util.List<java.lang.String> command,
java.lang.String nodeName,
boolean merge) |
RunnableNode(java.lang.String[] command,
java.lang.String nodeName) |
RunnableNode(java.lang.String[] command,
java.lang.String nodeName,
boolean merge) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getLauchCommand() |
java.lang.String |
getName()
Get name which somehow identifies this node.
|
boolean |
isRunning() |
void |
reset()
Called on each Nengo reset (open sim.
|
void |
start()
Try to start external process, start stream consumers.
|
void |
startAutoKiller()
Start the autokiller: a thread that checks static variable
which notifies that processes should exit.
|
void |
stop()
This stops the process, so the StreamGlobbers will exit themselves too.
|
void |
useLogging(boolean use)
whether to print to console
|
protected final java.lang.String me
protected final int autokillerSleepTime
protected java.lang.ProcessBuilder prb
protected java.lang.Process p
protected final java.lang.String[] comm
protected final java.lang.String name
protected boolean running
public RunnableNode(java.util.List<java.lang.String> command, java.lang.String nodeName)
command
- command to launch the nodenodeName
- name of the node (just for identification)public RunnableNode(java.lang.String[] command, java.lang.String nodeName)
public RunnableNode(java.util.List<java.lang.String> command, java.lang.String nodeName, boolean merge)
public RunnableNode(java.lang.String[] command, java.lang.String nodeName, boolean merge)
public void start()
start
in interface ExternalNodeContainer
java.io.IOException
public void startAutoKiller()
startAutoKiller
in interface NativeNodeContainer
public void stop()
stop
in interface ExternalNodeContainer
public java.lang.String getName()
ExternalNodeContainer
getName
in interface ExternalNodeContainer
public boolean isRunning()
isRunning
in interface ExternalNodeContainer
public java.lang.String[] getLauchCommand()
getLauchCommand
in interface NativeNodeContainer
public void useLogging(boolean use)
ExternalNodeContainer
useLogging
in interface ExternalNodeContainer
public void reset()
reset
in interface ExternalNodeContainer