Package com.io7m.waxmill.process.api

# Interface WXMProcessesType

All Known Implementing Classes:
  `WXMProcessesPOSIX`, `WXMProcessesPOSIXService`

    public interface WXMProcessesType

An API for creating processes.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | `processReplaceCurrent​(WXMProcessDescription description)` | Replace the current process with the process described by the given description.
  `java.lang.Process` | `processStart​(WXMProcessDescription description)` | Start a process described by the given description.
  `void` | `processStartAndWait​(WXMProcessDescription description)` | Start a process described by the given description.

- ## Method Details

  - ### processReplaceCurrent

    void processReplaceCurrent​(WXMProcessDescription description) throws java.io.IOException
    Replace the current process with the process described by the given description. This method, if it executes successfully, replaces the current JVM process entirely and therefore never returns.
    Parameters:
      `description` - The description
    Throws:
      `java.io.IOException` - If the process cannot be started

  - ### processStart

    java.lang.Process processStart​(WXMProcessDescription description) throws java.io.IOException
    Start a process described by the given description. This creates a new process upon which the caller can wait, extract data from streams, etc.
    Parameters:
      `description` - The description
    Returns:
      The newly executing process
    Throws:
      `java.io.IOException` - If the process cannot be started

  - ### processStartAndWait

    void processStartAndWait​(WXMProcessDescription description) throws java.io.IOException, java.lang.InterruptedException
    Start a process described by the given description. This creates a new process upon which the caller can wait, extract data from streams, etc. This method is equivalent to calling `processStart(WXMProcessDescription)`, waiting indefinitely for the process to exit, and throwing an `IOException` if the process returns a non-zero exit code.
    Parameters:
      `description` - The description
    Throws:
      `java.io.IOException` - If the process cannot be started, or if the process exits with a non-zero error code
      `java.lang.InterruptedException` - If waiting for the process is interrupted