|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.process.monitor.Monitor
public class Monitor
Method Summary | |
---|---|
void |
awaitTermination()
Blocks until all processes are terminated |
static Monitor |
create()
|
Lifecycle.State |
getState()
|
void |
start(List<JavaCommand> commands)
Starts commands and blocks current thread until all processes are in state Lifecycle.State.STARTED . |
void |
stop()
Blocks until all processes are terminated. |
void |
stopAsync()
Asks for processes termination and returns without blocking until termination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Monitor create()
public void start(List<JavaCommand> commands)
Lifecycle.State.STARTED
.
IllegalArgumentException
- if commands list is empty
IllegalStateException
- if already started or if at least one process failed to start. In this case
all processes are terminated. No need to execute stop()
public void awaitTermination()
public void stop()
public void stopAsync()
public Lifecycle.State getState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |