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 TypeMethodDescriptionvoid
sendMessage
(String message) Send a message to the process.void
start()
Start the process.void
stop()
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.
-