Interface ProcessController
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface ProcessController
The process controller. Can be used to start or stop it.
-
Method Summary
Modifier and TypeMethodDescriptionvoidsendMessage(String message) Send a message to the process.voidstart()Start the process.voidstop()Stop the process, calls java.lang.Process.distroy().
-
Method Details
-
start
void start()Start the process. This method blocks until the process ends. -
stop
void stop()Stop the process, calls java.lang.Process.distroy(). Will also kill sub-processes. -
sendMessage
Send a message to the process. The message will be sent "UTF-8" encoded via the java.lang.Process.getOutputStream().- Parameters:
message- The message.- Throws:
Exception- Thrown when the process was not started for some reason.
-