Package com.io7m.montarre.nativepack

# Class MNativeProcesses

java.lang.Object
com.io7m.montarre.nativepack.MNativeProcesses

All Implemented Interfaces:
  `MNativeProcessesType`, `AutoCloseable`

public final class MNativeProcesses extends Object implements MNativeProcessesType
The native processes interface.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MNativeProcesses()`
  The native processes interface.

- ## 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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.io7m.montarre.api.natives.MNativeProcessesType

  `executeAndWaitChecked`

- ## Constructor Details

  - ### MNativeProcesses

    public MNativeProcesses()
    The native processes interface.

- ## Method Details

  - ### executeAndWait

    public int executeAndWait(Map<String,String> environment, ConcurrentLinkedQueue<String> standardOut, ConcurrentLinkedQueue<String> standardError, List<String> commandLine) throws MException, InterruptedException
    Description copied from interface: `MNativeProcessesType`
    Execute a process, waiting for it to complete, and return the exit code.
    Specified by:
      `executeAndWait` in interface `MNativeProcessesType`
    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

  - ### close

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