Package com.io7m.montarre.api.natives

# Interface MNativeProcessesType

All Superinterfaces:
  `AutoCloseable`

All Known Implementing Classes:
  `MNativeProcesses`

public interface MNativeProcessesType extends AutoCloseable
An interface for running external native processes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `int`
  `executeAndWait(Map<String,String> environment, ConcurrentLinkedQueue<String> standardOut, ConcurrentLinkedQueue<String> standardError, List<String> commandLine)`
  Execute a process, waiting for it to complete, and return the exit code.
  `default void`
  `executeAndWaitChecked(Map<String,String> environment, ConcurrentLinkedQueue<String> standardOut, ConcurrentLinkedQueue<String> standardError, List<String> commandLine)`
  Execute a process, waiting for it to complete, and raise an exception if the exit code returned is non-zero.

- ## Method Details

  - ### executeAndWait

    int executeAndWait(Map<String,String> environment, ConcurrentLinkedQueue<String> standardOut, ConcurrentLinkedQueue<String> standardError, List<String> commandLine) throws MException, InterruptedException
    Execute a process, waiting for it to complete, and return the exit code.
    Parameters:
      `environment` - The environment
      `standardOut` - The standard out log
      `standardError` - The standard error log
      `commandLine` - The command line
    Returns:
      The exit code
    Throws:
      `MException` - On errors
      `InterruptedException` - On interruption

  - ### executeAndWaitChecked

    default void executeAndWaitChecked(Map<String,String> environment, ConcurrentLinkedQueue<String> standardOut, ConcurrentLinkedQueue<String> standardError, List<String> commandLine) throws MException, InterruptedException
    Execute a process, waiting for it to complete, and raise an exception if the exit code returned is non-zero.
    Parameters:
      `environment` - The environment
      `standardOut` - The standard out log
      `standardError` - The standard error log
      `commandLine` - The command line
    Throws:
      `MException` - On errors
      `InterruptedException` - On interruption

  - ### close

    void close() throws MException
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `MException`