# Class MNWorkspace

java.lang.Object
com.io7m.montarre.nativepack.internal.MNWorkspace

All Implemented Interfaces:
  `MNativeWorkspaceType`, `AutoCloseable`

public final class MNWorkspace extends Object implements MNativeWorkspaceType
A workspace.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MArchitectureName`
  `architecture()`
  `void`
  `close()`
  `Path`
  `createWorkDirectory()`
  `CompletableFuture<Path>`
  `javaRuntime()`
  `Flow.Publisher<com.io7m.streamtime.core.STTransferStatistics>`
  `javaRuntimeDownload()`
  `static MNativeWorkspaceType`
  `open(MNativeWorkspaceConfiguration configuration, MHTTPClientFactoryType httpClients, MPackageReaderType packageReader)`
  Open a workspace.
  `MOperatingSystemName`
  `operatingSystem()`

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

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

- ## Method Details

  - ### open

    public static MNativeWorkspaceType open(MNativeWorkspaceConfiguration configuration, MHTTPClientFactoryType httpClients, MPackageReaderType packageReader)
    Open a workspace.
    Parameters:
      `configuration` - The configuration
      `httpClients` - The HTTP clients
      `packageReader` - The current package
    Returns:
      A workspace

  - ### javaRuntimeDownload

    public Flow.Publisher<com.io7m.streamtime.core.STTransferStatistics> javaRuntimeDownload()
    Specified by:
      `javaRuntimeDownload` in interface `MNativeWorkspaceType`
    Returns:
      The transfer statistic for java runtime downloads

  - ### javaRuntime

    public CompletableFuture<Path> javaRuntime()
    Specified by:
      `javaRuntime` in interface `MNativeWorkspaceType`
    Returns:
      The java runtime

  - ### createWorkDirectory

    public Path createWorkDirectory() throws MException
    Specified by:
      `createWorkDirectory` in interface `MNativeWorkspaceType`
    Returns:
      A fresh working directory
    Throws:
      `MException` - On errors

  - ### close

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

  - ### operatingSystem

    public MOperatingSystemName operatingSystem()
    Specified by:
      `operatingSystem` in interface `MNativeWorkspaceType`
    Returns:
      The operating system name

  - ### architecture

    public MArchitectureName architecture()
    Specified by:
      `architecture` in interface `MNativeWorkspaceType`
    Returns:
      The architecture name