Interface ProcessController


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface ProcessController
    The process controller. Can be used to start or stop it.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void sendMessage​(java.lang.String message)
      Send a message to the process.
      void start()
      Start the process.
      void stop()
      Stop the process, calls java.lang.Process.distroy().
    • Method Detail

      • 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

        void sendMessage​(java.lang.String message)
                  throws java.lang.Exception
        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:
        java.lang.Exception - Thrown when the process was not started for some reason.